:root {
  --bg: #06060a;
  --bg-soft: #0d0d14;
  --panel: rgba(14, 14, 22, 0.86);
  --panel-strong: #11111a;
  --panel-soft: rgba(255, 255, 255, 0.04);
  --panel-muted: rgba(255, 255, 255, 0.02);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f4ff;
  --muted: rgba(246, 244, 255, 0.62);
  --faint: rgba(246, 244, 255, 0.42);
  --accent: #7c4dff;
  --accent-strong: #996dff;
  --accent-soft: rgba(124, 77, 255, 0.18);
  --accent-pink: #d44bff;
  --success: #63d39b;
  --danger: #ff6b81;
  --warning: #ffb86b;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --max-width: 1360px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 77, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(212, 75, 255, 0.14), transparent 24%),
    radial-gradient(circle at bottom center, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, #050509 0%, #090911 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
  opacity: 0.34;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.04em;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

.site-frame {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 10px 0;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-left: 18px;
  color: #fff;
  font: 800 1.28rem/1 "Sora", sans-serif;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-pink));
  box-shadow: 0 12px 28px rgba(124, 77, 255, 0.34);
}

.brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.18s ease;
}

.nav-icon {
  display: none;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-mobile-only {
  display: none !important;
}

.mobile-site-nav {
  display: none;
}

.mobile-app-topbar {
  display: none;
}

.mobile-phone-topbar,
.mobile-bottom-nav {
  display: none;
}

.mobile-phone-left,
.mobile-phone-actions,
.mobile-phone-brand {
  display: inline-flex;
  align-items: center;
}

.mobile-phone-left,
.mobile-phone-actions {
  gap: 10px;
}

.mobile-phone-brand {
  gap: 10px;
  color: #fff;
  font: 800 0.98rem/1 "Sora", sans-serif;
  letter-spacing: -0.04em;
}

.mobile-phone-brand .brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.mobile-phone-brand .brand-mark::before {
  display: none;
}

.mobile-phone-brand .brand-mark svg {
  width: 21px;
  height: 21px;
  stroke: #a45dff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 0 12px rgba(143, 79, 255, 0.35));
}

.mobile-menu-button,
.mobile-action-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mobile-menu-button svg,
.mobile-action-button svg,
.mobile-bottom-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mobile-action-button.has-badge,
.mobile-bottom-link-icon {
  position: relative;
}

.mobile-notification-badge,
.mobile-bottom-link-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-pink));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(124, 77, 255, 0.28);
}

.mobile-bottom-link {
  color: rgba(255, 255, 255, 0.58);
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 48px;
  font-size: 0.68rem;
  font-weight: 700;
}

.mobile-bottom-link.active {
  color: #c992ff;
}

.mobile-bottom-link-label {
  line-height: 1;
}

.mobile-app-brand {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.mobile-app-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: none;
}

.mobile-app-brand .brand-mark::before {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.mobile-app-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.mobile-app-link {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.mobile-app-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mobile-app-link:hover,
.mobile-app-link.active {
  border-color: rgba(124, 77, 255, 0.34);
  background: rgba(124, 77, 255, 0.18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.18), 0 10px 22px rgba(124, 77, 255, 0.16);
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 12px;
}

.search-shell {
  position: relative;
  width: min(100%, 280px);
}

.search-shell input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  outline: none;
}

.search-shell input::placeholder {
  color: var(--faint);
}

.search-shell::before {
  display: none;
}

.search-shell::after {
  display: none;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.button.primary {
  border-color: rgba(153, 109, 255, 0.85);
  background: linear-gradient(135deg, var(--accent), var(--accent-pink));
  box-shadow: 0 18px 34px rgba(124, 77, 255, 0.26);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.02);
}

.button.subtle {
  color: var(--muted);
}

.button.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.button.is-subscribed {
  border-color: rgba(99, 211, 155, 0.26);
  background: rgba(99, 211, 155, 0.12);
  color: var(--success);
  box-shadow: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(10, 10, 16, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-title p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
}

.tag-chip.active,
.tag-chip:hover {
  color: #fff;
  border-color: rgba(153, 109, 255, 0.6);
  background: rgba(124, 77, 255, 0.14);
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.app-popup[hidden] {
  display: none !important;
}

.app-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.app-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.app-popup-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(18, 20, 29, 0.98), rgba(10, 12, 18, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.app-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.app-popup-title {
  font: 800 1.15rem/1.1 "Manrope", sans-serif;
}

.app-popup-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .site-nav {
    position: absolute;
    top: calc(100% - 4px);
    left: 8px;
    right: 8px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(10, 10, 16, 0.94);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .topbar-actions {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-frame {
    width: min(calc(100% - 18px), var(--max-width));
  }

  .topbar {
    min-height: 74px;
    padding: 14px 0;
  }

  .topbar::before {
    inset: 6px 0;
    border-radius: 16px;
  }

  .brand {
    padding-left: 14px;
    font-size: 1.12rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 768px) {
  body::before {
    display: none;
  }

  button,
  input,
  textarea,
  select {
    font-size: 16px;
  }

  .button {
    min-height: 48px;
    padding: 0 16px;
  }

  .nav-toggle {
    width: 46px;
    height: 46px;
  }

  .site-nav a {
    width: 100%;
    min-height: 46px;
  }

  .search-shell,
  .search-shell input {
    width: 100%;
  }

  .search-shell input {
    min-height: 48px;
    border-radius: 9px;
  }

  .panel {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(12px);
  }

  .mobile-app-topbar {
    display: flex;
  }

  .mobile-phone-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 62px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 22px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 9, 13, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(7, 9, 13, 0.96);
    backdrop-filter: blur(20px);
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.28);
  }
}
