/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --court-wood: #C68642;
    --court-lines: #ffffff;
    --team-blue: #1565C0;
    --team-red: #C62828;
    --accent: #FF6F00;
    --accent-glow: #FFB300;
    --bg-dark: #0D1117;
    --bg-card: #161B22;
    --bg-panel: #1C2333;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --success: #2EA043;
    --danger: #F85149;
    --warning: #D29922;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===== SPLASH SCREEN ===== */
#splash-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0D1117 0%, #1a1a2e 50%, #16213e 100%);
}

.splash-content {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

.basketball-icon {
    font-size: 80px;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 111, 0, 0.5));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.logo-container h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin: 10px 0;
    text-shadow: 0 0 30px rgba(255, 111, 0, 0.3);
}

.logo-container .accent {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 111, 0, 0.6);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

/* ===== AUTH SCREEN ===== */
#auth-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0D1117 0%, #1a1a2e 50%, #16213e 100%);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 10px;
}

.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
    padding: 0 4px;
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.link-btn:active {
    color: var(--accent-glow);
}

/* ===== PROFILE SCREEN ===== */
#profile-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0D1117 0%, #1a1a2e 50%, #16213e 100%);
}

.profile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 2px solid #30363D;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-card:active {
    transform: scale(0.97);
    border-color: var(--accent);
}

.profile-card .profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--team-blue), #42A5F5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.profile-card .profile-info {
    flex: 1;
    text-align: left;
}

.profile-card .profile-name {
    font-size: 1rem;
    font-weight: 700;
}

.profile-card .profile-record {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-card .profile-iq {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent);
}

.profile-card .profile-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.profile-card .profile-delete:active {
    opacity: 1;
    color: var(--danger);
}

.profile-create {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-input {
    padding: 14px 18px;
    border: 2px solid #30363D;
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.2s;
}

.profile-input:focus {
    border-color: var(--accent);
}

.profile-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.profile-banner {
    text-align: center;
    padding: 10px 20px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
}

.profile-banner .banner-record {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 4px;
}

.splash-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
}

.menu-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-btn:active {
    transform: scale(0.96);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #FF8F00);
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 111, 0, 0.4);
}

.primary-btn:active {
    box-shadow: 0 2px 10px rgba(255, 111, 0, 0.3);
}

.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid #30363D;
}

.splash-footer {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== GAME SCREEN ===== */
#game-screen {
    flex-direction: column;
    background: var(--bg-dark);
}

/* HUD */
#game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-panel);
    border-bottom: 2px solid var(--accent);
    z-index: 10;
    min-height: 56px;
}

.hud-left, .hud-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 80px;
}

.hud-right {
    justify-content: flex-end;
}

.team-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--team-blue);
}

.ai-name {
    color: var(--team-red);
}

.score {
    font-size: 1.8rem;
    font-weight: 900;
}

.hud-center {
    text-align: center;
}

#quarter-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

#shot-clock {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

#game-clock {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Canvas Container */
#canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#game-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* ===== PANELS ===== */
#play-panel, #action-panel {
    padding: 12px 16px;
    background: var(--bg-panel);
    border-top: 1px solid #30363D;
}

.panel-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
    text-align: center;
}

#play-options, #action-options {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.play-btn {
    flex: 1;
    min-width: 70px;
    max-width: 120px;
    padding: 12px 8px;
    border: 2px solid #30363D;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.play-btn:active {
    transform: scale(0.95);
    border-color: var(--accent);
    background: rgba(255, 111, 0, 0.1);
}

.play-btn .play-icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 4px;
}

.play-btn .play-name {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Play announcement (auto-selected play) */
.play-announcement {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    background: rgba(255, 111, 0, 0.08);
    border: 2px solid var(--accent);
    border-radius: 12px;
    width: 100%;
    max-width: 340px;
    animation: playSlideIn 0.3s ease;
}

@keyframes playSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.play-announce-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.play-announce-info {
    text-align: left;
}

.play-announce-name {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 1px;
}

.play-announce-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* Defense announcement (AI attacking) */
.defense-announce {
    border-color: var(--danger);
    background: rgba(248, 81, 73, 0.08);
}

.play-btn.recommended {
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(46, 160, 67, 0.2);
}

/* Action buttons */
.action-btn {
    flex: 1;
    padding: 14px 10px;
    border: 2px solid #30363D;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    max-width: 140px;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn.shoot-btn {
    border-color: var(--danger);
    background: rgba(248, 81, 73, 0.1);
}

.action-btn.pass-btn {
    border-color: var(--team-blue);
    background: rgba(21, 101, 192, 0.1);
}

.action-btn.drive-btn {
    border-color: var(--accent);
    background: rgba(255, 111, 0, 0.1);
}

.action-btn .action-pct {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.panel-hidden {
    display: none !important;
}

/* ===== AI BRAIN PANEL ===== */
#ai-brain-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    background: var(--bg-panel);
    border-top: 2px solid #58a6ff;
    border-radius: 16px 16px 0 0;
    z-index: 20;
    overflow-y: auto;
    padding: 16px;
    transition: transform 0.3s ease;
}

#ai-brain-panel.panel-hidden {
    display: block !important;
    transform: translateY(100%);
    pointer-events: none;
}

#ai-brain-panel:not(.panel-hidden) {
    transform: translateY(0);
    pointer-events: auto;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: #58a6ff;
}

.brain-icon {
    font-size: 1.4rem;
}

.close-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

.brain-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.brain-section h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Decision tree visualization */
.tree-node {
    padding: 6px 12px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-node.question {
    background: rgba(88, 166, 255, 0.15);
    border-left: 3px solid #58a6ff;
}

.tree-node.answer-yes {
    background: rgba(46, 160, 67, 0.15);
    border-left: 3px solid var(--success);
    margin-left: 20px;
}

.tree-node.answer-no {
    background: rgba(248, 81, 73, 0.15);
    border-left: 3px solid var(--danger);
    margin-left: 20px;
}

.tree-node.chosen {
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.3);
    border-color: var(--accent-glow);
}

/* Prediction bars */
.pred-bar-container {
    margin: 6px 0;
}

.pred-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.pred-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pred-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Adaptation info */
.adapt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

.adapt-value {
    color: var(--accent);
    font-weight: 700;
}

/* ===== RESULT OVERLAY ===== */
#result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
    animation: fadeIn 0.3s ease;
}

#result-overlay.overlay-hidden {
    display: none;
}

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

#result-content {
    text-align: center;
    padding: 30px;
}

#result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

#result-text {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

#result-detail {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

#result-ai-note {
    font-size: 0.85rem;
    color: #58a6ff;
    background: rgba(88, 166, 255, 0.1);
    padding: 10px 16px;
    border-radius: 8px;
    margin-top: 12px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BOTTOM CONTROLS ===== */
#bottom-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px;
    background: var(--bg-dark);
    border-top: 1px solid #21262D;
}

.ctrl-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #30363D;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ctrl-btn:active {
    transform: scale(0.9);
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== AI LAB SCREEN ===== */
#ai-lab-screen {
    flex-direction: column;
    background: var(--bg-dark);
    overflow-y: auto;
}

.lab-header, .stats-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-panel);
    border-bottom: 1px solid #30363D;
    position: sticky;
    top: 0;
    z-index: 5;
}

.back-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px;
}

.lab-content, .stats-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.lab-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #21262D;
}

.lab-section h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.lab-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.lab-tree {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.slider-group label {
    min-width: 120px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.slider-group input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.slider-group span {
    min-width: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-align: right;
}

/* ===== STATS SCREEN ===== */
#stats-screen {
    flex-direction: column;
    background: var(--bg-dark);
    overflow-y: auto;
}

.stats-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #21262D;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-top: 4px;
    text-transform: uppercase;
}

.stats-detail {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #21262D;
}

.stats-detail h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent);
}

/* ===== UTILITY ===== */
.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile-specific */
@media (max-width: 380px) {
    .logo-container h1 {
        font-size: 2.8rem;
    }
    .play-btn {
        min-width: 60px;
        padding: 10px 6px;
        font-size: 0.7rem;
    }
    .action-btn {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .splash-content {
        max-width: 500px;
    }
    .play-btn {
        max-width: 150px;
        padding: 14px 12px;
    }
}

/* ===== POSITION SELECT SCREEN ===== */
#position-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0D1117 0%, #1a1a2e 50%, #16213e 100%);
}

.pos-select-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pos-select-header h2 {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.position-select-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
    max-height: 70vh;
    overflow-y: auto;
}

.pos-select-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 2px solid #30363D;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pos-select-card:active {
    transform: scale(0.97);
    border-color: var(--accent);
    background: rgba(255, 111, 0, 0.05);
}

.pos-select-badge {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pos-select-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.pos-select-key {
    font-size: 0.7rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
}

.pos-select-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.pos-select-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.pos-select-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

.pos-select-level-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.pos-select-level {
    font-size: 0.75rem;
    font-weight: 900;
    min-width: 42px;
}

.pos-select-xp-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.pos-select-xp-fill {
    height: 100%;
    border-radius: 2px;
}

.pos-select-bonus {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* HUD position badge */
.position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--team-blue);
    font-size: 0.7rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
}

/* ===== PLAYER CARD ===== */
.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #30363D;
}

.card-overall {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #FF8F00);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-overall-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: #000;
    line-height: 1;
}

.card-overall-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(0,0,0,0.6);
    letter-spacing: 1px;
}

.card-player-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.card-player-record {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-positions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.pos-details {
    flex: 1;
    min-width: 0;
}

.pos-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.pos-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pos-level {
    font-size: 0.85rem;
    font-weight: 900;
}

.pos-xp-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.pos-xp-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.pos-xp-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== XP GAINS IN RESULT OVERLAY ===== */
.result-xp {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.xp-gain {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 179, 0, 0.15);
    color: var(--accent-glow);
    font-size: 0.75rem;
    font-weight: 700;
}

.level-up-tag {
    color: var(--success);
    font-weight: 900;
    animation: levelPulse 0.6s ease-in-out 3;
}

@keyframes levelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
