:root {
  --bg: #0f1115;
  --bg-alt: #151822;
  --surface: #1a1e29;
  --surface-2: #21273a;
  --text: #f2f3f7;
  --text-muted: #a2a8bd;
  --accent: #7c5cff;
  --accent-2: #4dd6c4;
  --border: #2a2f42;
  --radius: 14px;
  --max-width: 1140px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9b7dff);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, #6a48ff, #8a68ff); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,17,21,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color .2s ease;
}
.nav a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text) !important;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* Auth area */
.auth-area { display: flex; align-items: center; margin-left: 20px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-name { font-size: 0.9rem; font-weight: 600; }

.auth-notice {
  display: none;
  background: rgba(124,92,255,0.12);
  border: 1px solid rgba(124,92,255,0.4);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.auth-notice code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-2);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}
.auth-tab.active { background: var(--accent); color: #fff; }

.btn-google {
  background: #fff;
  color: #1f1f1f;
  gap: 10px;
}
.btn-google:hover { background: #f2f2f2; }

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { padding: 0 12px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.auth-field input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
}
.auth-field input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: #ff6b6b; font-size: 0.85rem; min-height: 1.2em; margin: 0; }

/* Hero */
.hero {
  padding: 90px 0 70px;
  background: radial-gradient(circle at 80% 0%, rgba(124,92,255,0.18), transparent 55%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 12px;
}
.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.4rem; }
.hero-stats span { color: var(--text-muted); font-size: 0.85rem; }

.hero-visual {
  position: relative;
  height: 320px;
}
.hero-card {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.card-1 { top: 10%; left: 10%; }
.card-2 { top: 40%; left: 45%; background: var(--surface-2); }
.card-3 { top: 5%; left: 65%; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.section-sub { color: var(--text-muted); margin: 0; }

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .2s ease;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.products-loading {
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
  padding: 40px 0;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.product-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--accent-2);
}
.product-thumb {
  font-size: 2.6rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: 14px;
  margin-bottom: 18px;
}
.product-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.product-body p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 18px; }
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.price { font-size: 1.3rem; font-weight: 800; color: var(--accent-2); }
.pages { font-size: 0.8rem; color: var(--text-muted); }

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.benefit-icon { font-size: 2rem; margin-bottom: 14px; }
.benefit-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.benefit-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin: 0;
}
.testimonial p { font-size: 1rem; margin: 0 0 14px; }
.testimonial cite { color: var(--accent-2); font-style: normal; font-weight: 600; font-size: 0.88rem; }

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--accent); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--text-muted); margin: 12px 0 0; font-size: 0.92rem; }

/* Contact */
.contact-section { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.modal.open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.modal-box {
  position: relative;
  max-width: 420px;
  margin: 12vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-box h3 { margin: 0 0 10px; }
.modal-product-info { color: var(--accent-2); font-weight: 700; margin: 0 0 14px; }
.modal-box p { color: var(--text-muted); font-size: 0.92rem; }

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
}
