/* ════════════════════════════════════════════════════════════════
   TERYAQUIZ — BRAWL STARS / ARENA DESIGN SYSTEM (CSS)
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;800;900&display=swap');

.arena-font {
    font-family: 'Outfit', sans-serif;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes arenaPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes arenaShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

@keyframes scoreFloat {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-28px) scale(1.3); }
    100% { opacity: 0; transform: translateY(-45px) scale(0.9); }
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); border-color: rgba(239, 68, 68, 1); }
    50% { box-shadow: 0 0 16px 4px rgba(239, 68, 68, 0.9); border-color: rgba(248, 113, 113, 1); }
}

@keyframes streakFlame {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    50% { transform: scale(1.08) rotate(2deg); filter: drop-shadow(0 0 8px #f97316); }
}

.arena-pop {
    animation: arenaPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.arena-shake {
    animation: arenaShake 0.35s ease-in-out;
}

.arena-pulse-danger {
    animation: pulseRed 0.8s infinite;
}

.arena-streak-active {
    animation: streakFlame 1.2s infinite ease-in-out;
}

/* --- ARENA BUTTONS & CARDS --- */
.arena-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.88) 100%);
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-bottom: 5px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

.arena-hud-box {
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: 4px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

.arena-opt-btn {
    position: relative;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: 5px solid rgba(0, 0, 0, 0.5);
    border-radius: 18px;
    color: #f8fafc;
    font-weight: 800;
    transition: all 0.12s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* LIGHT THEME FIX */
body.light-theme .arena-opt-btn {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
    border-color: #cbd5e1 !important;
    border-bottom: 5px solid #94a3b8 !important;
    color: #0f172a !important;
}

body.light-theme .arena-opt-btn * {
    background-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.arena-opt-btn, .arena-opt-btn * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

.arena-opt-btn::selection, .arena-opt-btn *::selection {
    background: transparent !important;
    color: inherit !important;
}

.arena-opt-btn:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.arena-opt-btn:active {
    transform: translateY(3px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ANSWER STATES */
.arena-opt-correct {
    background: linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    border-color: #34d399 !important;
    border-bottom: 5px solid #064e3b !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5) !important;
    transform: scale(1.02);
}

.arena-opt-wrong {
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    border-color: #f87171 !important;
    border-bottom: 5px solid #7f1d1d !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5) !important;
}

.arena-opt-dimmed {
    opacity: 0.35;
    filter: grayscale(60%);
    pointer-events: none;
}

/* FLOAT SCORE EFFECT CONTAINER */
#arena-float-container {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 9999;
}

.float-score-tag {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 32px;
    color: #f59e0b;
    text-shadow: 0 3px 0 #000, 0 0 12px rgba(245, 158, 11, 0.8);
    animation: scoreFloat 0.8s ease-out forwards;
}
