/* ── Base ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html, body {
    font-family: 'Inter', sans-serif;
    background: #0d0d1a;
    color: #e8e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ── Hero / Home ──────────────────────────────────────── */
.home-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}
.orb1 { width: 500px; height: 500px; background: #7209b7; top: -100px; left: -150px; animation-delay: 0s; }
.orb2 { width: 400px; height: 400px; background: #0096c7; top: 50%; right: -100px; animation-delay: 3s; }
.orb3 { width: 350px; height: 350px; background: #f72585; bottom: -80px; left: 30%; animation-delay: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #a8b5ff;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    color: #fff;
}

.gradient-text {
    background: linear-gradient(90deg, #f72585, #7209b7, #4cc9f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* Type preview grid */
.type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.type-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
.type-chip:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.type-chip-emoji { font-size: 1rem; }
.type-chip-code { letter-spacing: 0.05em; }

/* Start button */
.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #7209b7, #f72585);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2.4rem;
    border-radius: 100px;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 8px 32px rgba(114, 9, 183, 0.5);
    margin-bottom: 2.5rem;
}
.btn-start:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(114, 9, 183, 0.65); }
.btn-arrow { font-size: 1.3rem; transition: transform 0.2s; }
.btn-start:hover .btn-arrow { transform: translateX(5px); }

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
}
.stat { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 800; color: #fff; }
.stat-label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* Trait cards */
.trait-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
}
.trait-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    text-align: center;
    flex: 1 1 160px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, background 0.2s;
}
.trait-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.09); }
.trait-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.trait-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; color: #fff; }
.trait-card p { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ── Quiz ─────────────────────────────────────────────── */
.quiz-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #0d0d1a;
}

.quiz-header {
    width: 100%;
    max-width: 680px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.quiz-back {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s;
}
.quiz-back:hover { color: #fff; }

.quiz-progress-wrap { flex: 1; }
.quiz-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7209b7, #f72585);
    border-radius: 100px;
    transition: width 0.4s ease;
}
.quiz-progress-label { font-size: 0.75rem; color: rgba(255,255,255,0.4); }

/* Quiz card */
.quiz-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 680px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, opacity 0.2s;
}

.quiz-dimension-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a8b5ff;
    background: rgba(114, 9, 183, 0.2);
    border: 1px solid rgba(114, 9, 183, 0.4);
    border-radius: 100px;
    padding: 0.3rem 1rem;
    margin-bottom: 1.5rem;
}

.quiz-question {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 2rem;
}

.quiz-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.quiz-options {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.quiz-option {
    flex: 1;
    min-height: 80px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: pre-wrap;
    text-align: center;
    padding: 0.5rem 0.25rem;
    line-height: 1.3;
    font-family: inherit;
}
.quiz-option:hover { border-color: #7209b7; background: rgba(114,9,183,0.15); color: #fff; transform: translateY(-2px); }
.quiz-option.selected { border-color: #f72585; background: rgba(247,37,133,0.2); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(247,37,133,0.3); }

/* slide animations */
.slide-out-left { transform: translateX(-60px); opacity: 0; }
.slide-out-right { transform: translateX(60px); opacity: 0; }
.slide-in-right { transform: translateX(60px); opacity: 0; }
.slide-in-left { transform: translateX(-60px); opacity: 0; }

/* Nav buttons */
.quiz-nav {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 680px;
    justify-content: space-between;
}
.btn-nav {
    padding: 0.75rem 1.8rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-prev { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); }
.btn-prev:hover:not(:disabled) { background: rgba(255,255,255,0.12); color: #fff; }
.btn-next { background: linear-gradient(135deg, #7209b7, #560bad); color: #fff; margin-left: auto; }
.btn-next:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(114,9,183,0.5); }
.btn-submit { background: linear-gradient(135deg, #f72585, #7209b7); color: #fff; margin-left: auto; }
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(247,37,133,0.5); }
.btn-nav:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Result ───────────────────────────────────────────── */
.result-hero {
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}
.result-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
}
.result-hero-inner { position: relative; z-index: 1; }
.result-emoji { font-size: 5rem; margin-bottom: 0.5rem; }
.result-code { font-size: 3.5rem; font-weight: 900; color: #fff; letter-spacing: 0.08em; }
.result-name { font-size: 1.5rem; font-weight: 600; color: rgba(255,255,255,0.85); margin-bottom: 0.75rem; }
.result-tagline { font-size: 1rem; color: rgba(255,255,255,0.6); font-style: italic; max-width: 480px; }

.result-body { max-width: 860px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }

.result-section { margin-bottom: 3rem; }
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Trait bars */
.trait-bars { display: flex; flex-direction: column; gap: 1rem; }
.trait-bar-row { display: flex; align-items: center; gap: 1rem; }
.trait-label-a, .trait-label-b {
    width: 110px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}
.trait-label-a { text-align: right; }
.trait-label-b { text-align: left; }
.dominant { color: #fff; font-weight: 700; }
.trait-bar-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
}
.trait-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7209b7, #f72585);
    border-radius: 100px;
    transition: width 0.8s ease;
}

.result-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
}

/* Strengths / weaknesses */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 580px) { .two-col { grid-template-columns: 1fr; } }

.result-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.5rem;
}
.result-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: #fff; }
.result-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.result-card li {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    padding-left: 1.2rem;
    position: relative;
}
.result-card li::before { content: '•'; position: absolute; left: 0; color: #7209b7; }
.weaknesses-card li::before { color: #f72585; }

/* Career chips */
.career-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.career-chip {
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    border: 2px solid;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    transition: all 0.2s;
}
.career-chip:hover { opacity: 0.8; }

/* All 16 types grid */
.all-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}
.all-type-card {
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0.75;
}
.all-type-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 1; }
.all-type-card.active-type { opacity: 1; box-shadow: 0 0 0 3px #fff, 0 8px 24px rgba(0,0,0,0.4); transform: translateY(-3px); }
.all-type-emoji { font-size: 1.5rem; }
.all-type-code { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: 0.05em; }
.all-type-name { font-size: 0.7rem; color: rgba(255,255,255,0.7); }

/* Action buttons */
.result-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.btn-retake, .btn-home {
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
}
.btn-retake { background: linear-gradient(135deg, #f72585, #7209b7); color: #fff; box-shadow: 0 6px 20px rgba(247,37,133,0.4); }
.btn-retake:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(247,37,133,0.5); }
.btn-home { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.15); }
.btn-home:hover { background: rgba(255,255,255,0.12); color: #fff; transform: translateY(-2px); }

/* ── Type popup ───────────────────────────────────────── */
.type-chip {
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s, outline 0.1s;
}
.type-chip-active {
    outline: 3px solid #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
}

.type-popup {
    background: rgba(15, 15, 30, 0.95);
    border: 2px solid;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    max-width: 520px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    animation: popIn 0.2s ease;
    backdrop-filter: blur(12px);
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.type-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.6);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}
.type-popup-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

.type-popup-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.type-popup-emoji { font-size: 2.5rem; }
.type-popup-code { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.06em; }
.type-popup-name { font-size: 0.95rem; color: rgba(255,255,255,0.6); font-weight: 500; }
.type-popup-tagline {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
}
.type-popup-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
}

/* ── Blazor error UI (hidden unless there's a real error) */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #c0392b;
    color: #fff;
    font-size: 0.9rem;
    z-index: 9999;
    text-align: center;
}
#blazor-error-ui a { color: #fff; font-weight: 700; text-decoration: underline; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 1rem; }

/* ── Layout / Nav cleanup ─────────────────────────────── */
.page { padding: 0; }
.sidebar { display: none; }
main { padding: 0 !important; }
article { padding: 0; }
