:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #818cf8;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --primary-border: rgba(79, 70, 229, 0.3);
  --bg: #090d16;
  --surface: #111827;
  --surface-alt: #1f2937;
  --surface-dark: #0b0f19;
  --surface-mockup-item: #0d131f;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: #1f2937;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.15s ease;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);

  &:hover {
    color: #a5b4fc;
  }
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 16px 0;

  & .header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  & .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 18px;
  }

  & .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;

    & a {
      color: var(--text-muted);
      font-size: 14px;
      font-weight: 500;

      &:hover {
        color: var(--text);
      }
    }

    & .nav-tip-btn {
      background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
      color: #ffffff !important;
      padding: 6px 14px;
      border-radius: var(--radius-pill);
      font-size: 13px !important;
      font-weight: 600 !important;
      box-shadow: var(--accent-gold-glow);
      transition: transform var(--transition-fast), box-shadow var(--transition-fast);

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px var(--accent-gold-glow);
      }
    }
  }
}

/* Hero Section */
.hero-section {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 10%, var(--primary-glow), transparent 60%);

  & .hero-container {
    max-width: 900px;
    margin: 0 auto;
  }

  & .hero-badge {
    display: inline-block;
    background: var(--primary-glow);
    border: 1px solid var(--primary-border);
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 24px;
  }

  & .hero-title {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
  }

  & .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  & .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.6;
  }

  & .hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);

  &:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5);
  }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition-fast), color var(--transition-fast);

  &:hover {
    background: var(--surface-alt);
    color: var(--text);
  }
}

/* Mockup Card */
.mockup-container {
  max-width: 760px;
  margin: 0 auto;
}

.mockup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;

  & .mockup-header {
    background: var(--surface-dark);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;

    & .mockup-dots {
      display: flex;
      gap: 6px;

      & .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;

        &.red { background: var(--danger); }
        &.yellow { background: var(--accent-gold); }
        &.green { background: var(--success); }
      }
    }

    & .mockup-bar {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }
  }

  & .mockup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;

    & .mockup-image {
      width: 100%;
      height: auto;
      display: block;
    }
  }
}

/* Section Common */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-badge {
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-align: center;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 50px;
  line-height: 1.6;
}

/* Features Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);

  &:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
  }

  & .feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
  }

  & h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
  }

  & p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
  }
}

/* Comparison Table Section */
.comparison-section {
  background: var(--surface-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.comparison-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;

  & th,
  & td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }

  & th {
    background: var(--surface-alt);
    font-weight: 700;
    color: var(--text);

    &.highlight-col {
      background: rgba(79, 70, 229, 0.2);
      color: #a5b4fc;
      border-left: 2px solid var(--primary);
      border-right: 2px solid var(--primary);
    }
  }

  & td {
    color: var(--text-muted);

    &.highlight-col {
      background: rgba(79, 70, 229, 0.05);
      color: var(--text);
      font-weight: 600;
      border-left: 2px solid var(--primary-border);
      border-right: 2px solid var(--primary-border);
    }

    &.feature-name {
      color: var(--text);
      font-weight: 600;
    }

    & .badge-good {
      color: var(--success);
      font-weight: 700;
    }

    & .badge-bad {
      color: var(--danger);
    }
  }

  & tr:last-child td {
    border-bottom: none;
  }
}

/* How It Works 3-Step Flow */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step-card-flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  display: flex;
  flex-direction: column;

  & .step-badge-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
  }

  & h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
  }

  & p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
  }
}

/* FAQ Accordion */
.faq-section {
  background: var(--bg);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color var(--transition-fast);

  &[open] {
    border-color: var(--primary-border);
  }

  & summary {
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;

    &::-webkit-details-marker {
      display: none;
    }

    &::after {
      content: '+';
      font-size: 1.4rem;
      color: var(--primary-light);
      font-weight: 400;
      transition: transform var(--transition-fast);
    }
  }

  &[open] summary::after {
    content: '−';
  }

  & .faq-answer {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;

    & strong {
      color: var(--text);
    }

    & ul {
      padding-left: 20px;
      margin-top: 8px;
    }

    & li {
      margin-bottom: 6px;
    }
  }
}

/* Privacy Section */
.privacy-section {
  & .privacy-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-mockup-item) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 840px;
    margin: 0 auto;

    & .privacy-icon {
      font-size: 40px;
      margin-bottom: 16px;
    }

    & h2 {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 16px;
    }

    & p {
      color: var(--text-muted);
      font-size: 1.05rem;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    & .compliance-badges {
      display: flex;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 24px;
      font-size: 13px;
      font-weight: 600;
      color: #34d399;
    }

    & .link-arrow {
      font-weight: 600;
      font-size: 15px;
    }
  }
}

/* Support Section */
.support-section {
  & .support-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.04));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 840px;
    margin: 0 auto;

    & .support-star {
      font-size: 36px;
      display: inline-block;
      margin-bottom: 12px;
    }

    & h2 {
      font-size: 1.8rem;
      font-weight: 700;
      margin-bottom: 12px;
    }

    & p {
      color: var(--text-muted);
      font-size: 1.05rem;
      margin-bottom: 24px;
    }

    & .btn-tip-large {
      display: inline-block;
      background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
      color: #ffffff !important;
      font-weight: 700;
      font-size: 16px;
      padding: 14px 28px;
      border-radius: var(--radius-md);
      box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
      transition: transform var(--transition-fast);

      &:hover {
        transform: translateY(-2px);
      }
    }
  }
}

/* Legal Pages (Privacy Policy, Terms of Service) */
.legal-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 24px;

  & h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
  }

  & .updated {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
  }

  & h2 {
    font-size: 1.4rem;
    margin: 28px 0 12px;
    color: var(--primary-light);
  }

  & p,
  & ul {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
  }

  & ul {
    padding-left: 24px;
  }

  & li {
    margin-bottom: 8px;
  }

  & code {
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e0e7ff;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: #060910;

  & .footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
  }

  & .footer-right {
    display: flex;
    gap: 20px;

    & a {
      color: var(--text-muted);

      &:hover {
        color: var(--text);
      }
    }
  }
}

/* Responsive & Accessibility */
@media (max-width: 768px) {
  .hero-title { font-size: 2.3rem; }
  .section-title { font-size: 1.8rem; }
  .privacy-section .privacy-card,
  .support-section .support-card { padding: 28px 20px; }
  .site-header .nav-links { display: none; }
  .comparison-table th, .comparison-table td { padding: 12px 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
