/* Zerplex - Dark Elegant Theme */
:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a25;
  --text: #e8e6e3;
  --text-dim: #8a8a95;
  --gold: #d4a847;
  --gold-dim: #a68432;
  --crimson: #c2185b;
  --radius: 8px;
  --max-w: 900px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

/* Nav */
.nav { background: var(--bg2); border-bottom: 1px solid #222; padding: 0 1.5rem; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.3rem; letter-spacing: 4px; color: var(--gold); font-weight: bold; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; font-size: 0.9rem; }
.nav-links a { color: var(--text-dim); font-family: sans-serif; }
.nav-links a:hover { color: var(--gold); }
.btn-nav { background: var(--gold-dim); color: var(--bg) !important; padding: 6px 16px; border-radius: var(--radius); font-weight: bold; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius);
  font-family: sans-serif; font-size: 0.95rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--text); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-secondary:hover { background: var(--gold); color: var(--bg); }
.btn-large { padding: 16px 40px; font-size: 1.1rem; }

/* Hero */
.hero {
  text-align: center; padding: 5rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
}
.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; line-height: 1.2; }
.gold { color: var(--gold); }
.hero-sub { color: var(--text-dim); font-size: 1.15rem; max-width: 600px; margin: 0 auto 2rem; }

/* Sections */
.section { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem; }
.section h2 { font-size: 1.8rem; margin-bottom: 2rem; text-align: center; }
.page-title { font-size: 2.2rem; text-align: center; margin-bottom: 1rem; }
.page-intro { color: var(--text-dim); text-align: center; max-width: 600px; margin: 0 auto 3rem; }

/* Archetype Grid */
.archetype-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.archetype-card {
  background: var(--bg2); border: 1px solid #222; border-left: 3px solid;
  padding: 1.5rem; border-radius: var(--radius); transition: transform 0.2s, border-color 0.2s;
}
.archetype-card:hover { transform: translateY(-3px); border-color: var(--gold) !important; }
.archetype-card h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.tagline { color: var(--text-dim); font-size: 0.9rem; font-style: italic; }
.card-summary { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.8rem; font-family: sans-serif; }

/* Quiz */
.quiz-container { max-width: 700px; margin: 0 auto; padding: 2rem 1.5rem; }
.quiz-header { text-align: center; margin-bottom: 2rem; }
.quiz-header h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.progress-bar { height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); transition: width 0.3s; width: 0; }
.progress-text { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.5rem; font-family: sans-serif; }

.question-text { font-size: 1.3rem; margin-bottom: 1.5rem; line-height: 1.4; }
.options { display: flex; flex-direction: column; gap: 0.8rem; }
.option {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  background: var(--bg2); border: 1px solid #333; border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s; font-family: sans-serif;
}
.option:hover { border-color: var(--gold); }
.option input[type="radio"] { accent-color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; }
.option-text { font-size: 0.95rem; line-height: 1.4; }
.option:has(input:checked) { border-color: var(--gold); background: rgba(212, 168, 71, 0.08); }

.quiz-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

/* Login Wall */
.login-wall { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 2rem; }
.wall-content { text-align: center; max-width: 450px; }
.wall-content h1 { font-size: 2rem; margin-bottom: 1rem; }
.wall-content p { color: var(--text-dim); margin-bottom: 1.5rem; }
.wall-note { font-size: 0.85rem; color: var(--text-dim); font-family: sans-serif; }

/* Result Page */
.result-page { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem; }
.result-reveal { text-align: center; padding: 3rem 0 2rem; }
.result-label { color: var(--text-dim); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 0.5rem; font-family: sans-serif; }
.result-name { font-size: 3rem; margin-bottom: 0.5rem; }
.result-tagline { color: var(--text-dim); font-style: italic; font-size: 1.1rem; }
.result-summary { font-size: 1.05rem; line-height: 1.8; padding: 2rem 0; border-bottom: 1px solid #222; margin-bottom: 2rem; }

.detail-section { margin-bottom: 2rem; }
.detail-section h2, .detail-section h3 { margin-bottom: 0.8rem; }
.secondary { background: var(--bg2); padding: 1.5rem; border-radius: var(--radius); }

.trait-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  padding: 6px 14px; border: 1px solid; border-radius: 20px;
  font-size: 0.85rem; font-family: sans-serif; color: var(--text-dim);
}

/* Score Bars */
.result-scores { margin: 2.5rem 0; }
.score-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.score-row { display: flex; align-items: center; gap: 0.8rem; font-family: sans-serif; font-size: 0.85rem; }
.score-label { width: 130px; flex-shrink: 0; text-align: right; }
.score-label a { color: var(--text-dim); }
.score-label a:hover { color: var(--gold); }
.score-bar-bg { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.score-val { width: 24px; color: var(--text-dim); }

.result-actions { display: flex; gap: 1rem; justify-content: center; padding: 2rem 0; flex-wrap: wrap; }

/* Archetype Detail */
.archetype-detail { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.archetype-hero { text-align: center; padding: 3rem 0; border-bottom: 2px solid; margin-bottom: 2rem; }
.archetype-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.tagline-large { font-style: italic; color: var(--text-dim); font-size: 1.15rem; }
.archetype-body { padding: 1rem 0; }
.archetype-body h2 { font-size: 1.4rem; margin-bottom: 0.8rem; color: var(--gold); }
.archetype-quote {
  border-left: 3px solid; padding: 1.2rem 1.5rem; margin: 2rem 0;
  background: var(--bg2); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.archetype-quote cite { display: block; margin-top: 0.5rem; color: var(--text-dim); font-size: 0.9rem; }

.examples { display: grid; gap: 1rem; }
.example-card { background: var(--bg2); padding: 1.2rem; border-radius: var(--radius); }
.example-card h3 { color: var(--gold); margin-bottom: 0.4rem; font-size: 1.1rem; }
.example-card p { font-size: 0.95rem; color: var(--text-dim); font-family: sans-serif; }

.archetype-nav { padding: 2rem 0; border-top: 1px solid #222; margin-top: 2rem; }
.archetype-nav h3 { text-align: center; margin-bottom: 1rem; }
.archetype-grid.mini { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.archetype-link { font-size: 0.9rem; padding: 6px 14px; border: 1px solid #333; border-radius: 20px; font-family: sans-serif; }
.archetype-link:hover { border-color: currentColor; }

/* Profile */
.profile-page .welcome { font-size: 1.1rem; margin-bottom: 2rem; }
.results-list { display: grid; gap: 1rem; }
.result-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2); border-left: 3px solid; padding: 1.2rem 1.5rem;
  border-radius: var(--radius); transition: transform 0.2s;
}
.result-card:hover { transform: translateX(4px); }
.result-card-type { font-size: 1.1rem; font-weight: bold; }
.result-card-date { color: var(--text-dim); font-size: 0.85rem; font-family: sans-serif; }

.empty-state { text-align: center; padding: 3rem; color: var(--text-dim); }

/* CTA */
.cta-section { text-align: center; padding: 2.5rem 0; }

/* Error */
.error-page { text-align: center; padding: 5rem 1.5rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-page p { color: var(--text-dim); margin-bottom: 2rem; }

/* Footer */
.footer { text-align: center; padding: 2rem; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid #1a1a25; font-family: sans-serif; }

/* Mobile */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .result-name { font-size: 2rem; }
  .archetype-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0.8rem; font-size: 0.8rem; }
  .quiz-nav { flex-direction: column; }
  .score-label { width: 90px; font-size: 0.75rem; }
}


/* MBTI Specific */
.quiz-intro { color: var(--text-dim); margin-bottom: 1.5rem; font-family: sans-serif; }
.result-subname { font-size: 1.4rem; color: var(--text-dim); margin-bottom: 0.3rem; }

.mbti-dimensions { margin: 2.5rem 0; }
.dim-bars { display: flex; flex-direction: column; gap: 1rem; }
.dim-row { display: flex; align-items: center; gap: 0.6rem; font-family: sans-serif; font-size: 0.8rem; }
.dim-label { width: 120px; color: var(--text-dim); }
.dim-label:first-child { text-align: right; }
.dim-label.active { color: var(--gold); font-weight: bold; }
.dim-bar { flex: 1; display: flex; height: 28px; border-radius: 4px; overflow: hidden; }
.dim-fill-left { background: var(--gold-dim); display: flex; align-items: center; justify-content: center; color: var(--bg); font-weight: bold; font-size: 0.75rem; min-width: 30px; }
.dim-fill-right { background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 0.75rem; min-width: 30px; }

.tag.weakness { border-color: #c62828; color: #ef9a9a; }

.mbti-group { margin-bottom: 2.5rem; }
.group-title { font-size: 1.3rem; margin-bottom: 1rem; color: var(--gold); border-bottom: 1px solid #222; padding-bottom: 0.5rem; }

/* Compatibility */
.compat-section { display: flex; flex-direction: column; gap: 1.5rem; }
.compat-group { }
.compat-label { font-size: 0.9rem; margin-bottom: 0.6rem; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.compat-label.best { color: #66bb6a; }
.compat-label.good { color: var(--gold); }
.compat-label.challenging { color: #ef5350; }
.compat-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.compat-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 8px 14px; border: 1px solid; border-radius: var(--radius);
  font-family: sans-serif; font-size: 0.9rem; font-weight: bold;
  transition: transform 0.2s;
}
.compat-tag:hover { transform: translateY(-2px); }
.compat-tag.best { border-color: #66bb6a; color: #66bb6a; }
.compat-tag.good { border-color: var(--gold); color: var(--gold); }
.compat-tag.challenging { border-color: #ef5350; color: #ef5350; }
.compat-name { font-weight: normal; font-size: 0.8rem; color: var(--text-dim); }

.trait-list { list-style: none; padding: 0; }
.trait-list li { padding: 0.5rem 0; border-bottom: 1px solid #1a1a25; font-family: sans-serif; }
.trait-list li:last-child { border-bottom: none; }
.trait-list.strengths li::before { content: '+ '; color: #66bb6a; font-weight: bold; }
.trait-list.weaknesses li::before { content: '- '; color: #ef5350; font-weight: bold; }

.career-tag { background: rgba(212, 168, 71, 0.08); }

@media (max-width: 600px) {
  .dim-label { width: 70px; font-size: 0.7rem; }
  .nav-links { flex-wrap: wrap; }
}

/* Quiz Grid */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.quiz-card {
  background: var(--bg2); border: 1px solid #222; border-top: 3px solid;
  padding: 1.8rem; border-radius: var(--radius); transition: transform 0.2s;
}
.quiz-card:hover { transform: translateY(-3px); }
.quiz-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card-meta { display: inline-block; margin-top: 0.8rem; font-family: sans-serif; font-size: 0.8rem; color: var(--text-dim); background: var(--bg3); padding: 3px 10px; border-radius: 12px; }
.result-card-quiz { font-size: 0.8rem; color: var(--text-dim); font-family: sans-serif; margin-bottom: 0.2rem; }
