/* AI Stack Finder — Global Styles */
:root {
  --bg: #0f1117;
  --bg2: #1a1d27;
  --bg3: #242736;
  --border: #2e3248;
  --text: #f0f2ff;
  --muted: #8b92b8;
  --accent: #6c63ff;
  --accent2: #4ade80;
  --danger: #f87171;
  --card-hover: #1e2135;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Nav */
nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(15,17,23,0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
}
nav .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--accent); }
nav a.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
nav a.nav-cta:hover { opacity: 0.85; text-decoration: none; }

/* Hero */
.hero {
  text-align: center;
  padding: 72px 20px 48px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  color: #a5a0ff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, #6c63ff, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 36px;
}

/* Quiz Card */
.quiz-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 720px;
  margin: 0 auto 64px;
  box-shadow: var(--shadow);
}
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-step h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.quiz-step .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}
.step-dot.done { background: var(--accent); }
.step-dot.active { background: var(--accent2); }

/* Grid options */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.option-btn {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.option-btn:hover {
  border-color: var(--accent);
  background: rgba(108,99,255,0.08);
}
.option-btn.selected {
  border-color: var(--accent);
  background: rgba(108,99,255,0.15);
  color: #fff;
}
.option-btn .emoji { font-size: 1.2rem; flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 99px;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #5a52e0; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

/* Results */
.results-header {
  text-align: center;
  margin-bottom: 32px;
}
.results-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.results-header p { color: var(--muted); font-size: 0.9rem; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s;
  position: relative;
}
.tool-card:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tool-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border-radius: 10px;
}
.tool-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tool-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.tool-tagline {
  color: var(--muted);
  font-size: 0.825rem;
  margin-bottom: 10px;
}
.tool-desc {
  color: #c0c4dc;
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.tool-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.tool-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent2);
}
.tool-rating {
  font-size: 0.8rem;
  color: var(--muted);
}
.tool-rating span { color: #fbbf24; }
.tool-highlight {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}
.tool-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
  text-decoration: none;
}
.tool-cta:hover {
  background: #5a52e0;
  text-decoration: none;
}

/* Profession pages */
.prof-hero {
  padding: 60px 20px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.prof-hero h1 { font-size: clamp(1.75rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -0.02em; }
.prof-hero p { color: var(--muted); max-width: 520px; margin: 0 auto; }

/* Stats strip */
.stats-strip {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* Section */
.section { padding: 40px 0; }
.section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Trust section */
.trust-strip {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.825rem;
}
footer a { color: var(--muted); }
footer p { margin-bottom: 8px; }
.footer-disclaimer {
  font-size: 0.75rem;
  color: #4a506e;
  max-width: 600px;
  margin: 16px auto 0;
}

/* Responsive */
@media (max-width: 600px) {
  .quiz-card { padding: 24px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 16px 32px; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* Progress bar */
.quiz-progress {
  background: var(--border);
  height: 3px;
  border-radius: 99px;
  margin-bottom: 32px;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* Restart */
.restart-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 16px;
  display: block;
  text-align: center;
  width: 100%;
}
.restart-btn:hover { color: var(--text); }
