:root {
  --bg: #08111f;
  --bg-soft: #0e1a2d;
  --card: rgba(15, 25, 43, 0.78);
  --card-strong: rgba(11, 18, 32, 0.96);
  --line: rgba(120, 148, 190, 0.2);
  --line-strong: rgba(104, 145, 255, 0.28);
  --fg: #eef4ff;
  --muted: #99a8c1;
  --accent: #3d7bff;
  --accent-2: #69a8ff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
}

body[data-theme="light"] {
  --bg: #eef3fb;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(46, 70, 108, 0.14);
  --line-strong: rgba(61, 123, 255, 0.24);
  --fg: #0f1728;
  --muted: #5f6f8c;
  --accent: #2f6ef5;
  --accent-2: #5a8dff;
  --shadow: 0 22px 60px rgba(26, 48, 92, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(61,123,255,0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(105,168,255,0.12), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-shell {
  min-height: 100vh;
  padding: 20px 18px 32px;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto 20px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 20, 36, 0.58);
  backdrop-filter: blur(18px);
  border-radius: 34px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  z-index: 12;
}

body[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(95, 145, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(61,123,255,0.28), rgba(61,123,255,0.08));
  position: relative;
}

.brand-mark-core {
  width: 14px;
  height: 18px;
  border: 2px solid #4a86ff;
  border-radius: 10px 10px 14px 14px;
  position: relative;
}

.brand-mark-core::before,
.brand-mark-core::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.brand-mark-core::before {
  top: 3px;
  width: 4px;
  height: 4px;
  background: #4a86ff;
  border-radius: 999px;
}

.brand-mark-core::after {
  bottom: -8px;
  width: 2px;
  height: 10px;
  background: #4a86ff;
  box-shadow: -5px -1px 0 0 #4a86ff, 5px -1px 0 0 #4a86ff;
}

.brand-word {
  font-size: 19px;
  text-transform: lowercase;
}

.topbar-actions {
  display: inline-flex;
  gap: 12px;
  margin-left: auto;
}

.icon-btn {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-moon {
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.icon-moon::after {
  content: "";
  position: absolute;
  inset: -2px -2px auto auto;
  width: 12px;
  height: 12px;
  background: var(--card-strong);
  border-radius: 50%;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-btn span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.nav a,
.nav-link-button {
  color: var(--muted);
  transition: color .2s ease, opacity .2s ease;
}

.nav a:hover,
.nav-link-button:hover { color: var(--fg); }

.nav-form { margin: 0; }

.nav-link-button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 22px;
  margin-top: 26px;
}

.hero-card,
.hero-side-card,
.glass-card,
.auth-card,
.selector-card,
.legal-card,
.section-block,
.list-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 28px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(61,123,255,0.18), transparent 24%),
    linear-gradient(180deg, rgba(15, 25, 43, 0.92), rgba(12, 20, 34, 0.92));
}

body[data-theme="light"] .hero-card {
  background:
    radial-gradient(circle at top right, rgba(61,123,255,0.12), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,248,255,0.96));
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  line-height: .95;
  letter-spacing: -0.06em;
  margin: 18px 0 14px;
  max-width: 660px;
}

.hero-text,
.auth-card p,
.legal-card p,
.list-card p,
.subtle {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 560px;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.hero-side {
  display: grid;
  gap: 18px;
}

.hero-side-card,
.glass-card {
  padding: 24px;
}

.hero-side-card strong,
.glass-card strong {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.05em;
}

.mini-label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
}

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

.pill-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(91, 140, 255, 0.25);
  background: rgba(61, 123, 255, 0.16);
  color: #d7e8ff;
  font-weight: 700;
}

body[data-theme="light"] .pill-badge { color: var(--accent); }

.pill-badge.muted {
  background: rgba(255,255,255,0.08);
  color: var(--muted);
}

.btn {
  min-height: 56px;
  padding: 0 22px;
  border-radius: 18px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: white;
  box-shadow: 0 12px 34px rgba(61, 123, 255, 0.34);
}

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn-full { width: 100%; }

.mini-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.glass-card h2,
.section-head h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.glass-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 620px);
  padding: 30px;
}

.auth-card-wide { width: min(100%, 720px); }

.auth-card h1,
.legal-card h1,
.panel-head h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stack-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.input {
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  color: var(--fg);
  padding: 0 16px;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.check-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 18px;
}

.selector-card,
.legal-card,
.section-block {
  padding: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tab {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.tab-active {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: white;
  border-color: transparent;
}

.captcha {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  margin: 18px 0 4px;
  background: rgba(255,255,255,0.04);
}

.section-head { margin-bottom: 14px; }

.admin-list {
  display: grid;
  gap: 14px;
}

.list-card {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.list-card strong { font-size: 18px; }

.list-meta {
  min-width: 220px;
  display: grid;
  gap: 10px;
  text-align: right;
  color: var(--muted);
}

.list-meta strong {
  display: block;
  color: var(--fg);
  font-size: 16px;
  margin-top: 4px;
}

.footer {
  max-width: 1180px;
  margin: 30px auto 0;
  padding: 0 6px;
}

.footer-line {
  border-top: 1px solid var(--line);
  padding: 18px 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

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

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal-on {
  opacity: 1;
  transform: translateY(0);
}

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

  .list-card,
  .panel-head,
  .footer-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-meta {
    min-width: 0;
    text-align: left;
  }

  .menu-btn { display: inline-flex; }

  .nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 10px;
    left: 10px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: var(--card-strong);
    box-shadow: var(--shadow);
  }

  .nav-open { display: flex; }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 14px 12px 24px;
  }

  .topbar {
    padding: 14px 16px;
    border-radius: 26px;
  }

  .topbar-actions { gap: 8px; }

  .icon-btn {
    width: 48px;
    height: 48px;
  }

  .hero-card,
  .hero-side-card,
  .glass-card,
  .auth-card,
  .selector-card,
  .legal-card,
  .section-block,
  .list-card {
    border-radius: 24px;
  }

  .hero-card,
  .auth-card,
  .selector-card,
  .legal-card,
  .section-block {
    padding: 20px;
  }

  .hero-title { font-size: 54px; }
}
