:root {
  --canvas: #050608;
  --canvas-2: #0b0f14;
  --surface: rgba(13, 17, 23, 0.82);
  --surface-strong: rgba(16, 20, 27, 0.95);
  --line: rgba(146, 164, 184, 0.22);
  --line-strong: rgba(146, 164, 184, 0.38);
  --ink: #eef3f7;
  --ink-muted: #a7b4c5;
  --primary: #ff7a2f;
  --primary-strong: #de5f16;
  --teal: #1dc2a0;
  --teal-soft: rgba(29, 194, 160, 0.14);
  --danger-bg: rgba(255, 116, 116, 0.14);
  --danger-line: rgba(255, 143, 143, 0.4);
  --danger-ink: #ff9a9a;
  --success-ink: #67e2c6;
  --shadow-soft: 0 20px 34px rgba(0, 0, 0, 0.44);
  --shadow-hard: 0 24px 52px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% -5%, rgba(255, 122, 47, 0.2), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(29, 194, 160, 0.17), transparent 37%),
    linear-gradient(160deg, var(--canvas) 0%, #07090c 46%, var(--canvas-2) 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(188, 204, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(188, 204, 220, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 14%, #000 20%, rgba(0, 0, 0, 0.3) 68%, transparent 95%);
}

a {
  color: inherit;
}

.page,
.footer {
  width: min(1180px, calc(100vw - 30px));
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  width: min(1220px, calc(100vw - 26px));
  margin-left: auto;
  margin-right: auto;
  margin-top: 12px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 21, 28, 0.96) 0%, rgba(10, 14, 20, 0.92) 100%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(11px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  position: sticky;
  top: 8px;
  z-index: 40;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.brand span {
  display: grid;
  line-height: 1.03;
}

.brand strong {
  font-family: "Syne", "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand small {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.nav {
  justify-self: end;
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 22, 30, 0.94) 0%, rgba(11, 16, 22, 0.94) 100%);
  padding: 5px;
  scrollbar-width: thin;
}

.nav::-webkit-scrollbar {
  height: 6px;
}

.nav::-webkit-scrollbar-thumb {
  background: rgba(146, 164, 184, 0.35);
  border-radius: 999px;
}

.nav a,
.nav button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #bcc7d5;
  text-decoration: none;
  padding: 8px 11px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
}

.nav a:hover,
.nav button:hover {
  border-color: rgba(146, 164, 184, 0.35);
  color: #f4f8fb;
  background: rgba(255, 255, 255, 0.05);
}

.nav a[aria-current="page"] {
  color: #eff6ff;
  border-color: rgba(106, 147, 255, 0.62);
  background: linear-gradient(180deg, rgba(54, 82, 156, 0.5) 0%, rgba(28, 45, 90, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border-color: rgba(255, 122, 47, 0.6);
  background: linear-gradient(145deg, #ff9556 0%, var(--primary) 100%);
  box-shadow: 0 10px 18px rgba(222, 95, 22, 0.3);
}

.nav .btn-danger {
  color: var(--danger-ink);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.nav .btn-muted {
  color: #9be5d3;
  border-color: rgba(29, 194, 160, 0.42);
  background: rgba(29, 194, 160, 0.14);
}

.nav .cta img,
.icon-inline img {
  width: 14px;
  height: 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #d2deeb;
  font-size: 0.79rem;
  font-weight: 700;
  max-width: 180px;
}

.user-chip img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
}

.page {
  margin-bottom: 30px;
  display: grid;
  gap: 14px;
}

.hero,
.card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 24px;
  display: grid;
  gap: 11px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -170px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.18) 0%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
  gap: 14px;
}

.kicker {
  margin: 0;
  color: #85b6ff;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 900;
}

.hero h1,
.section-title {
  margin: 8px 0;
  font-family: "Syne", "Segoe UI", sans-serif;
  font-size: clamp(1.72rem, 3.6vw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.68;
  max-width: 72ch;
}

.actions,
.hero-actions,
.inline-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 1px solid transparent;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 10px 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  border-color: rgba(255, 122, 47, 0.65);
  background: linear-gradient(145deg, #ff9556 0%, var(--primary) 100%);
  box-shadow: 0 12px 20px rgba(222, 95, 22, 0.32);
}

.btn-ghost {
  color: #9eead8;
  border-color: rgba(29, 194, 160, 0.42);
  background: rgba(29, 194, 160, 0.14);
}

.btn-muted {
  color: #d2deeb;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.btn-danger {
  color: var(--danger-ink);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.btn:disabled,
button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 20px;
}

.card h2,
.card h3 {
  margin: 0 0 9px;
  font-family: "Syne", "Segoe UI", sans-serif;
  font-size: 1.27rem;
  letter-spacing: -0.02em;
}

.card p,
.card li {
  color: var(--ink-muted);
  line-height: 1.66;
}

.card ul,
.card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.card > h2 + h2 {
  margin-top: 22px;
}

code {
  color: #83e9d2;
  background: rgba(29, 194, 160, 0.14);
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 0.9em;
}

.plan-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hard);
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 194, 160, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.plan-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(145deg, #ff9556, var(--primary));
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 900;
}

.plan-name {
  margin: 0;
  font-size: 1.25rem;
}

.plan-price {
  margin: 9px 0 4px;
  font-family: "Syne", "Segoe UI", sans-serif;
  font-size: 2rem;
  color: var(--ink);
}

.plan-price small {
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.plan-tagline {
  margin-bottom: 14px;
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.input:focus {
  outline: none;
  border-color: rgba(29, 194, 160, 0.6);
  box-shadow: 0 0 0 3px rgba(29, 194, 160, 0.18);
}

.status {
  margin: 0;
  min-height: 1.2em;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.status.success {
  color: var(--success-ink);
}

.status.error {
  color: var(--danger-ink);
}

.premium-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.premium-pill.active {
  color: #90f2dc;
  background: rgba(29, 194, 160, 0.15);
  border: 1px solid rgba(29, 194, 160, 0.4);
}

.premium-pill.inactive {
  color: var(--danger-ink);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 12px;
}

.footer {
  margin-bottom: 22px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 17, 23, 0.88);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.hidden {
  display: none !important;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card.active {
  border-color: rgba(255, 122, 47, 0.52);
  box-shadow: 0 0 0 1px rgba(255, 122, 47, 0.28), var(--shadow-soft);
}

.plan-limit-note {
  margin: 0;
  font-size: 0.82rem;
  color: #8de9d3;
}

.soft-note {
  margin: 0;
  color: #a2b0c1;
  font-size: 0.88rem;
}

.backup-tools {
  display: grid;
  gap: 10px;
}

.backup-tools .actions {
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: #c4d2e2;
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 140ms ease;
}

.footer-links a:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.hero,
.card,
.footer,
.topbar {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid.three,
  .grid.two,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    width: calc(100vw - 18px);
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    width: calc(100vw - 12px);
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }

  .hero,
  .card {
    padding: 16px;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .page,
  .footer {
    width: calc(100vw - 14px);
  }

  .actions,
  .hero-actions,
  .inline-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .topbar {
    margin-top: 10px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .brand strong {
    font-size: 0.94rem;
  }
}