@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #101014;
  --surface: #18181c;
  --surface-2: #1e1e24;
  --border: #2a2a32;
  --border-light: #3a3a44;

  --purple: #c4b5fd;
  --purple-dark: #a78bfa;
  --purple-bg: rgba(196, 181, 253, 0.1);
  --purple-border: rgba(196, 181, 253, 0.2);

  --text: #ffffff;
  --text-2: #a1a1aa;
  --text-3: #71717a;

  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;

  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 10px;
}

/* Light theme */
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f4f5;
  --surface-2: #e4e4e7;
  --border: #c4c4cc;
  --border-light: #a1a1aa;
  --text: #18181b;
  --text-2: #3f3f46;
  --text-3: #71717a;
  --purple: #7c3aed;
  --purple-dark: #6d28d9;
  --purple-bg: rgba(124, 58, 237, 0.08);
  --purple-border: rgba(124, 58, 237, 0.2);
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #d97706;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ═══════════ NAVBAR ═══════════ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.nav-center {
  display: flex;
  gap: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-center a:hover, .nav-center a.active { color: var(--text); }
.nav-center a::before { content: '●'; font-size: 6px; color: var(--purple); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover { border-color: var(--purple); color: var(--purple); }

.theme-toggle svg { width: 16px; height: 16px; }

/* ═══════════ BUTTONS ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-purple {
  background: var(--purple);
  color: #000;
}
.btn-purple:hover { background: var(--purple-dark); transform: translateY(-1px); }

.btn-dark {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-dark:hover { border-color: var(--border-light); }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

.btn-lg { padding: 14px 28px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

/* ═══════════ HERO ═══════════ */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196,181,253,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,181,253,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--purple-bg);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-2);
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-buttons { display: flex; gap: 12px; justify-content: center; }

/* ═══════════ SECTIONS ═══════════ */
.sec {
  padding: 80px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 12px;
}

.sec h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.sec .sec-desc { font-size: 14px; color: var(--text-3); margin-bottom: 40px; }

/* ═══════════ BENTO GRID ═══════════ */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 12px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.bento-card:hover { border-color: var(--purple-border); }
.bento-card.span-2 { grid-column: span 2; }
.bento-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.bento-card h3::before { content: attr(data-icon); }
.bento-card p { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.bento-card .card-visual { flex: 1; display: flex; align-items: center; justify-content: center; margin-top: 16px; }

/* ═══════════ STATS ═══════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 60px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.stat-card .stat-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.stat-card .stat-desc { font-size: 11px; color: var(--text-3); margin-bottom: 16px; line-height: 1.5; }
.stat-card .stat-num { font-size: 28px; font-weight: 800; padding-top: 12px; border-top: 1px solid var(--border); }
.stat-card .stat-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ═══════════ PRICING ═══════════ */
.price-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 32px;
}

.price-tabs .ptab {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-tabs .ptab.active { background: var(--purple); color: #000; }

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.price-card .price-amount { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.price-card .price-amount small { font-size: 24px; }
.price-card .price-name { font-size: 13px; color: var(--text-3); font-weight: 600; text-transform: uppercase; margin-bottom: 20px; }
.price-card .btn { width: 100%; }

/* ═══════════ AUTH ═══════════ */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.auth-box {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.auth-box h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.auth-box .auth-sub { font-size: 13px; color: var(--text-3); margin-bottom: 36px; }
.auth-box .auth-sub a { color: var(--purple); font-weight: 600; }

.form-field { margin-bottom: 16px; text-align: left; }
.form-field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: 0.2s;
}

.form-input:focus { border-color: var(--purple); }
.form-input::placeholder { color: var(--text-3); }

.form-msg { font-size: 12px; text-align: center; margin-top: 8px; min-height: 0; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--green); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 11px;
  color: var(--text-3);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ═══════════ PROFILE ═══════════ */
.profile-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 32px;
  align-items: start;
}

.profile-left { display: flex; flex-direction: column; gap: 12px; }

.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.user-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.user-card .user-name { font-size: 14px; font-weight: 700; }
.user-card .user-name span { color: var(--text-3); font-weight: 400; }
.user-card .user-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.user-card .copy-icon { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-3); cursor: pointer; font-size: 14px; }

.activate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.activate-card label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }
.activate-row { display: flex; gap: 8px; }
.activate-row input {
  flex: 1;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.activate-row input::placeholder { color: var(--text-3); }

.profile-right { display: flex; flex-direction: column; gap: 12px; }

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-tab {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: 0.2s;
}

.profile-tab.active { background: var(--purple); color: #000; border-color: var(--purple); }
.profile-tab:hover:not(.active) { border-color: var(--border-light); color: var(--text); }

.profile-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}

.info-card .ic-label { font-size: 11px; color: var(--text-3); margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.info-card .ic-label::before { content: '●'; font-size: 6px; color: var(--purple); }
.info-card .ic-value { font-size: 14px; font-weight: 600; }

/* ═══════════ FOOTER ═══════════ */
.footer {
  padding: 48px 32px 24px;
  max-width: 1100px;
  margin: 80px auto 0;
  border-top: 1px solid var(--border);
}

.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 8px; transition: 0.2s; }
.footer-col a:hover { color: var(--text); }

.footer-brand { padding-top: 24px; border-top: 1px solid var(--border); margin-bottom: 16px; }
.footer-brand h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.footer-brand p { font-size: 12px; color: var(--text-3); }

.footer-bottom { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding-top: 16px; border-top: 1px solid var(--border); }

/* ═══════════ UTILITIES ═══════════ */
.hidden { display: none !important; }

@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav { padding: 12px 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .stats-row { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-info { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sec { padding: 40px 16px; }
}
