/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-dark: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --purple: #7c3aed;
  --purple-dark: #6d28d9;
  --purple-soft: #f5f3ff;
  --orange: #f59e0b;
  --orange-soft: #fff7ed;
  --cyan: #0891b2;
  --cyan-soft: #ecfeff;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --pink: #db2777;
  --pink-soft: #fdf2f8;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-blue: 0 18px 48px rgba(37, 99, 235, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

i {
  line-height: 1;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* === NAVIGATION === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(1220px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-weight: 800;
  color: var(--text);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand span:last-child {
  font-size: 17px;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.nav-links a {
  transition: 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.btn-primary:hover {
  background: #020617;
}

.btn-outline {
  background: #fff;
  color: var(--text-soft);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--line-dark);
  color: var(--text);
}

.btn-full {
  width: 100%;
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

/* === HERO COMMONS === */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: block;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-badges span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* === SECTIONS === */
.section {
  padding: 82px 0;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 780px;
  margin-bottom: 36px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-kicker {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -2px;
  color: var(--text);
  font-weight: 850;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--muted);
  font-size: 17px;
}

/* === STATS STRIP === */
.stats-strip {
  padding: 24px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.stat {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 8px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* === CHECK LIST === */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.check-list li {
  display: flex;
  gap: 10px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 650;
}

.check-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 900;
}

/* === FEATURE CARD (shared by index & beta) === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
}

.feature-card h3 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
}

/* === SPLIT / PANEL (shared by index, beta, file, sign) === */
.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  align-items: stretch;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}

.panel p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 22px;
}

/* === CTA === */
.cta {
  padding: 82px 0;
  background: var(--text);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -1.6px;
  max-width: 720px;
  margin-bottom: 12px;
}

.cta p {
  color: #cbd5e1;
  max-width: 660px;
  font-size: 16px;
}

.cta .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cta .btn-primary {
  background: #fff;
  color: var(--text);
  border-color: #fff;
}

/* === FOOTER === */
.footer {
  padding: 28px 0;
  background: #020617;
  color: #94a3b8;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}

.footer-line a {
  color: #94a3b8;
  transition: 0.18s ease;
}

.footer-line a:hover {
  color: #fff;
}

.footer-line .site-name {
  color: #fff;
  font-weight: 700;
}

.footer-line .site-url {
  color: #bfdbfe;
  font-weight: 800;
}

/* === USER MENU DROPDOWN === */
.user-menu-wrap {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.18s ease;
  white-space: nowrap;
}

.user-menu-trigger:hover {
  border-color: var(--line-dark);
  color: var(--text);
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 200;
  display: none;
}

.user-menu-dropdown.show {
  display: block;
}

.user-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s ease;
}

.user-menu-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.user-menu-item.logout-item {
  color: #ef4444;
}

.user-menu-item.logout-item:hover {
  background: #fef2f2;
}

/* === RESPONSIVE: NAV MOBILE === */
@media (max-width: 1060px) {
  .nav-links,
  .nav-actions .btn-outline {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links.mobile-open {
    position: fixed;
    top: 68px;
    left: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 101;
    max-height: calc(100vh - 136px);
    max-height: calc(100dvh - 136px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .nav-links.mobile-open a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
  }

  .nav-links.mobile-open a:hover {
    background: var(--bg-soft);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .container,
  .nav-inner {
    width: min(100% - 30px, 1180px);
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 62px 0;
  }

  .section-title {
    letter-spacing: -1.3px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-line {
    justify-content: flex-start;
    text-align: left;
  }

  .hero-actions {
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

/* === BUTTON: GLOW VARIANT === */
.btn-glow {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: var(--shadow-blue);
}

.btn-glow:hover {
  box-shadow: 0 24px 56px rgba(37, 99, 235, 0.22);
}

/* === ACCOUNT MENU DROPDOWN === */
.account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-trigger {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.18s ease;
  max-width: 230px;
  font-family: inherit;
}

.account-trigger:hover {
  background: var(--bg-soft);
  border-color: var(--line-dark);
  transform: translateY(-1px);
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 1000;
  flex: 0 0 auto;
}

.account-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.75;
  transition: 0.18s ease;
}

.account-menu:hover .account-arrow {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.18s ease;
  z-index: 300;
}

.account-menu:hover .account-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.account-dropdown::before {
  content: "";
  position: absolute;
  right: 24px;
  top: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

.account-dropdown a,
.account-dropdown button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: 0.16s ease;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.account-dropdown .logout {
  color: #dc2626;
}

.account-dropdown .logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

.account-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

/* === MOBILE AUTH & USER ACTIONS === */
.mobile-auth-actions {
  display: none;
}

.mobile-user-actions {
  display: none;
}

@media (max-width: 1060px) {
  .nav-actions .account-menu {
    display: none !important;
  }

  .nav-links.mobile-open .mobile-auth-actions {
    display: none;
  }

  .nav-links.mobile-open .mobile-user-actions {
    display: block;
    padding: 10px 8px 4px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
  }

  .mobile-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
  }

  .mobile-user-card .account-avatar {
    width: 34px;
    height: 34px;
  }

  .mobile-user-card::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    margin-left: auto;
    transition: 0.18s ease;
  }

  .mobile-user-actions.open .mobile-user-card::after {
    transform: rotate(225deg);
    margin-top: 6px;
  }

  .mobile-user-info strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-user-info span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    margin-top: 2px;
  }

  .mobile-user-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 8px;
  }

  .mobile-user-actions.open .mobile-user-grid {
    display: grid;
  }

  .nav-links.mobile-open .mobile-user-grid a {
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 900;
  }

  .nav-links.mobile-open .mobile-user-grid a.mobile-logout {
    color: #dc2626;
    background: #fff7ed;
    border-color: #fed7aa;
  }

  .nav-links.mobile-open .mobile-auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 8px 4px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
  }

  .nav-links.mobile-open .mobile-auth-actions a {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
  }

  .nav-links.mobile-open .mobile-auth-actions .mobile-login {
    background: #f8fafc;
    color: var(--text-soft);
    border: 1px solid var(--line);
  }

  .nav-links.mobile-open .mobile-auth-actions .mobile-register {
    background: #0f172a;
    color: #fff;
    border: 1px solid #0f172a;
  }
}

@media (max-width: 720px) {
  .nav-links.mobile-open .mobile-auth-actions {
    grid-template-columns: 1fr;
  }

  .mobile-user-grid {
    grid-template-columns: 1fr;
  }
}

/* === MOBILE MENU BUTTON OVERRIDE (ensure visible on small nav) === */
@media (max-width: 1060px) {
  .nav-actions .menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .nav-actions .btn {
    display: none !important;
  }
}
