/* ============================
   Heroic Adventures Assistant
   Dark Theme Stylesheet
   ============================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0b0e17;
  --bg-card: #12162299;
  --bg-card-solid: #141824;
  --bg-surface: #1a1f30;
  --bg-input: #0d1020;
  --border-color: #2a3050;
  --border-glow: #7c5cfc44;
  --text-primary: #e8e6f0;
  --text-secondary: #9a97b0;
  --text-muted: #6b6880;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-glow: #7c5cfc33;
  --accent-warm: #f59e0b;
  --accent-warm-glow: #f59e0b22;
  --gradient-hero: linear-gradient(135deg, #7c5cfc 0%, #a78bfa 50%, #c084fc 100%);
  --gradient-card: linear-gradient(160deg, rgba(124, 92, 252, 0.08) 0%, rgba(167, 139, 250, 0.03) 100%);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.12) 0%, rgba(124, 92, 252, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-glow);
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-title span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.8;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 500;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.45);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-glow);
}

.btn-lg {
  padding: 18px 42px;
  font-size: 1.05rem;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 56px;
  font-weight: 300;
  line-height: 1.75;
}

.section-subtitle strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Features Grid --- */
.features {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0e1121 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
}

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-dark);
}

.steps {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.step-number {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--border-glow);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-light);
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Setup Section --- */
.setup {
  background: linear-gradient(180deg, #0e1121 0%, var(--bg-dark) 100%);
}

.setup-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body);
}

.tab:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.tab.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.setup-panel {
  display: none;
}

.setup-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.setup-steps {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.setup-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.setup-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--border-glow);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
}

.setup-step h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.setup-step p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
}

.setup-step code {
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--accent-light);
}

/* --- Code Blocks --- */
.code-block {
  margin-top: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.copy-btn {
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-glow);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.copy-btn:hover {
  background: rgba(124, 92, 252, 0.2);
}

.copy-btn.copied {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
}

.code-block pre {
  padding: 16px 20px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #c4c0d8;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* --- Tools Grid --- */
.tools-section {
  background: var(--bg-dark);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: all 0.3s ease;
}

.tool-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.tool-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.tool-card > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.tool-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-commands code {
  padding: 4px 12px;
  font-size: 0.78rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--accent-light);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* --- FAQ --- */
.faq {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0e1121 100%);
}

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

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item.open {
  border-color: var(--border-glow);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--accent-light);
}

.faq-chevron {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

.faq-answer strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- CTA --- */
.cta {
  background: var(--bg-dark);
  padding: 80px 0 100px;
}

.cta-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 14px;
}

.cta-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.02rem;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-sub {
  margin-top: 6px;
  font-size: 0.8rem !important;
  color: var(--text-muted);
  opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    padding: 80px 0 60px;
  }

  .section {
    padding: 70px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .setup-tabs {
    gap: 6px;
  }

  .tab {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-content {
    padding: 40px 24px;
  }
}
