/* =====================================================
   TALENT TEST — style.css
   Color theme: warm gold + teal (different from ADHD)
   ===================================================== */

/* ---------- CSS VARIABLES ---------- */
:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(255, 215, 0, 0.04);
    --bg-card-hover: rgba(255, 215, 0, 0.08);
    --bg-selected: rgba(245, 158, 11, 0.18);
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(245, 158, 11, 0.5);
    --accent: #F59E0B;
    --accent-2: #10B981;
    --accent-gradient: linear-gradient(135deg, #F59E0B, #FBBF24, #34D399);
    --accent-gradient-soft: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(16, 185, 129, 0.3));
    --green: #22c55e;
    --yellow: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --text: #f0f4f8;
    --text-muted: #8d9db0;
    --text-dim: #5c6e82;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: 0.22s cubic-bezier(0.4, 0, -0.2, 1);
    --font: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
    --bg: #faf8f0;
    --bg-secondary: #f0ebe0;
    --bg-card: rgba(245, 158, 11, 0.06);
    --bg-card-hover: rgba(245, 158, 11, 0.12);
    --bg-selected: rgba(245, 158, 11, 0.2);
    --border: rgba(0, 0, 0, 0.1);
    --border-active: rgba(245, 158, 11, 0.6);
    --text: #1a1207;
    --text-muted: #6b5a3e;
    --text-dim: #9c8a6e;
    --shadow: 0 8px 32px rgba(180, 120, 0, 0.12);
    --shadow-card: 0 4px 20px rgba(180, 120, 0, 0.08);
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* ---------- NAV ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

[data-theme="light"] .nav {
    background: rgba(250, 248, 240, 0.85);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.05rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    color: var(--text);
}

.theme-toggle:hover {
    background: var(--bg-selected);
    border-color: var(--accent);
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    padding-top: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 48px 80px;
    align-items: center;
    position: relative;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 100px 24px 60px;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }
}

.hero-bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: #F59E0B;
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #10B981;
    bottom: 0;
    left: -100px;
    animation-delay: -4s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #F59E0B;
    top: 40%;
    left: 40%;
    animation-delay: -8s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 520px;
    line-height: 1.8;
}

.hero-subtitle strong {
    color: var(--text);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.meta-dot {
    color: var(--text-dim);
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 99px;
    background: var(--accent-gradient);
    color: #0d1117;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
    transition: all var(--transition);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 45px rgba(245, 158, 11, 0.5);
}

.hero-source {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-preview {
    width: 360px;
    height: 360px;
    opacity: 0.5;
}

/* ---------- QUIZ SECTION ---------- */
.quiz-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
}

.quiz-container {
    width: 100%;
    max-width: 700px;
}

.quiz-header {
    margin-bottom: 32px;
}

.quiz-progress-wrap {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.quiz-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.quiz-progress-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.dim-badge {
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.question-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-card);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 36px;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding: 0 6px;
}

.options {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    padding: 16px 0;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text);
    font-family: var(--font);
}

.option-val {
    font-size: 1.2rem;
    font-weight: 700;
}

.option-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: center;
}

.option-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.option-btn.selected {
    background: var(--bg-selected);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.option-btn.selected .option-val {
    color: var(--accent);
}

.keyboard-hint {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}

kbd {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.btn-nav {
    padding: 12px 24px;
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 0.95rem;
    font-family: var(--font);
    transition: all var(--transition);
}

.btn-nav:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
}

.btn-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.btn-next {
    background: var(--accent-gradient);
    color: #0d1117;
    font-weight: 700;
    border: none;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn-next:disabled {
    background: var(--bg-secondary);
    color: var(--text-dim);
    box-shadow: none;
}

/* ---------- RESULT SECTION ---------- */
.result-section {
    padding: 80px 24px 60px;
}

.result-container {
    max-width: 1000px;
    margin: 0 auto;
}

.result-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--accent-gradient-soft);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius);
    padding: 36px 40px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.result-subtitle {
    color: var(--text-muted);
}

.btn-restart {
    padding: 12px 24px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid var(--border-active);
    color: var(--accent);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-restart:hover {
    background: rgba(245, 158, 11, 0.1);
}

.section-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

/* Highlights */
.highlights-section {
    margin-bottom: 48px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-sm);
    padding: 24px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.highlight-dim {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.highlight-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.highlight-score {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-top: 8px;
}

.highlight-careers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.career-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Radar */
.radar-section {
    margin-bottom: 48px;
}

.radar-wrap {
    display: flex;
    justify-content: center;
}

#radarCanvas {
    max-width: 100%;
}

/* Dim Grid */
.dim-section {
    margin-bottom: 48px;
}

.dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.dim-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px;
    transition: all var(--transition);
    animation: fadeIn 0.3s ease;
}

.dim-card:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}

.dim-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dim-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dim-icon {
    font-size: 1.4rem;
}

.dim-name {
    font-weight: 700;
    font-size: 1rem;
}

.dim-score-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

.dim-score-max {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.dim-bar-bg {
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.dim-desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
.result-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.83rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.btn-restart-bottom {
    margin-top: 20px;
    padding: 12px 28px;
    border-radius: 99px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}

.btn-restart-bottom:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- UTILITY ---------- */
.hidden {
    display: none !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
    .question-card {
        padding: 24px 20px;
    }

    .question-text {
        font-size: 1.15rem;
    }

    .options {
        gap: 8px;
    }

    .option-btn {
        padding: 12px 4px;
    }

    .option-val {
        font-size: 1rem;
    }

    .result-banner {
        padding: 24px;
    }

    .result-title {
        font-size: 1.5rem;
    }

    .dim-grid,
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .scale-labels {
        display: none;
    }
}

/* ---------- MILESTONE TOAST (quiz encouragement) ---------- */
.milestone-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: linear-gradient(135deg, #1a1f2e, #252d3a);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f0f4f8;
    padding: 14px 28px;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.2);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}

[data-theme="light"] .milestone-toast {
    background: linear-gradient(135deg, #1a1207, #2d1f0a);
}

.milestone-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- RADAR SUMMARY ---------- */
.radar-summary {
    margin: 24px auto 0;
    max-width: 700px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-2);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    animation: fadeIn 0.5s ease;
}

/* ---------- DIM TIER INTERPRETATION ---------- */
.dim-tier-text {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.7;
    border-left: 2px solid var(--accent);
}

/* ---------- FOOTER ACTIONS (restart + PDF) ---------- */
.footer-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-save-pdf {
    padding: 12px 24px;
    border-radius: 99px;
    background: var(--accent-gradient);
    color: #0d1117;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.btn-save-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.45);
}