:root {
    --gold: #FFD700;
    --gold-dim: #B8960A;
    --red: #FF2D55;
    --blue: #00C6FF;
    --dark: #0A0A0F;
    --dark2: #12121A;
    --dark3: #1A1A28;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 215, 0, 0.15);
    --text: #F0EAD6;
    --text-dim: rgba(240, 234, 214, 0.55);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 198, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 45, 85, 0.07) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.screen.active {
    display: flex;
}

/* ===== INTRO ===== */
#intro-screen {
    text-align: center;
    gap: 2rem;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.intro-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 10vw, 7rem);
    line-height: 0.95;
    letter-spacing: 2px;
}

.intro-title .line1 {
    color: var(--text);
}

.intro-title .line2 {
    background: linear-gradient(90deg, var(--gold), #FFA500, var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro-subtitle {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

.role-icons-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.role-icon-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    transition: all 0.2s;
}

.role-icon-pill:hover {
    border-color: rgba(255, 215, 0, 0.4);
    color: var(--gold);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gold);
    color: #0A0A0F;
    border: none;
    border-radius: 8px;
    padding: 16px 48px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.intro-meta {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    gap: 20px;
    justify-content: center;
}

.intro-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== QUIZ ===== */
#quiz-screen {
    justify-content: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.quiz-header {
    width: 100%;
    max-width: 680px;
    margin-bottom: 2.5rem;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
}

.progress-count {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
}

.progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #FFA500);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.question-card {
    width: 100%;
    max-width: 680px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    backdrop-filter: blur(10px);
}

.question-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 0.75rem;
}

.question-text {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 1.75rem;
}

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.75rem;
}

.answer-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.answer-btn:hover {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(4px);
}

.answer-btn.selected {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold);
}

.answer-btn.selected .answer-key {
    background: var(--gold);
    color: #0A0A0F;
}

.answer-key {
    min-width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s;
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    border-radius: 8px;
    padding: 11px 24px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid transparent;
}

.btn-back {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-dim);
}

.btn-back:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--text);
}

.btn-back:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.btn-next {
    background: var(--gold);
    color: #0A0A0F;
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.btn-next:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.btn-next:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ===== RESULT ===== */
#result-screen {
    gap: 0;
    padding: 2rem 1.5rem 3rem;
    justify-content: flex-start;
    align-items: center;
}

.result-wrapper {
    width: 100%;
    max-width: 680px;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-announce {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 0.5rem;
}

.result-role-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 12vw, 6.5rem);
    line-height: 0.9;
    letter-spacing: 3px;
}

.result-icon-big {
    font-size: 4rem;
    display: block;
    margin: 1rem 0 0.5rem;
}

.result-tagline {
    font-size: 1.1rem;
    color: var(--text-dim);
    font-weight: 500;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.result-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.result-desc {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-dim);
    font-weight: 400;
}

.traits-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trait-pill {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-pos {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.rank-pos.gold {
    color: var(--gold);
}

.rank-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.rank-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    min-width: 90px;
}

.rank-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.rank-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.4), rgba(255, 215, 0, 0.8));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rank-bar-fill.top {
    background: linear-gradient(90deg, var(--gold), #FFA500);
}

.rank-score {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-retry {
    flex: 1;
    background: transparent;
    border: 1.5px solid rgba(255, 215, 0, 0.35);
    border-radius: 8px;
    padding: 14px 24px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-retry:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: var(--gold);
}

.btn-share {
    flex: 1;
    background: var(--gold);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #0A0A0F;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-share:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
    transform: translateY(-1px);
}

.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1A1A28;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    white-space: nowrap;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.anim-in {
    animation: fadeSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.question-card {
    animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(255, 215, 0, 0.25); }
}

.result-role-name {
    animation: fadeSlideIn 0.6s 0.1s both;
}

.result-card {
    animation: fadeSlideIn 0.5s 0.2s both;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .question-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .result-actions {
        flex-direction: column;
    }
}

.divider-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 0 auto;
}
