/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0d0d0f;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #a78bfa;
  --accent-hover: #8b5cf6;
  --border: #27272a;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'DM Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-signin {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.google-btn-wrap {
  min-width: 120px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-user-link {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.nav-user-link:hover {
  text-decoration: underline;
}

.nav-user-muted {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.nav-user-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-out {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}

.nav-user-out:hover {
  color: var(--text);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 80px 0 100px;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-sub {
  margin: 0 0 32px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Sections */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-highlight {
  background: var(--bg);
  padding: 96px 0;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 32px;
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.2s, border-color 0.2s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link .card-arrow {
  display: block;
  margin-top: 12px;
  font-size: 1.25rem;
  color: var(--accent);
}

.card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

.card p {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card-price {
  margin: 0 0 20px !important;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text) !important;
}

/* Why section */
.why-section .section-sub {
  margin-bottom: 48px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.why-item {
  text-align: center;
  padding: 24px 16px;
}

.why-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 16px;
}

.why-item h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.why-item p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ */
.faq-list {
  max-width: 560px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0 0 20px;
  padding: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-link:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-setup {
  margin-left: 0.5em;
}

/* Payment modal */
.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.payment-modal.payment-modal-open {
  opacity: 1;
  visibility: visible;
}

.payment-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.payment-modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.payment-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.payment-modal-close:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

.payment-modal-protected {
  margin: 0 0 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.payment-modal-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
}

.payment-modal-product {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.payment-modal-sub {
  margin: 0 0 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method {
  display: block;
  padding: 14px 20px;
  text-align: center;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.payment-method:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

/* Order success banner (after payment) */
.order-success-banner {
  position: relative;
  margin: 0 0 24px;
  padding: 20px 48px 20px 24px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius);
}

.order-success-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #22c55e;
}

.order-success-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.order-success-text a {
  color: var(--accent);
  text-decoration: none;
}

.order-success-text a:hover {
  text-decoration: underline;
}

.order-success-dismiss {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.order-success-dismiss:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}

/* Mobile */
@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 48px 0;
  }
}
