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

:root {
    --bg: #1a1a2e;
    --card: #16213e;
    --accent: #e94560;
    --gold: #ffd93d;
    --green: #6bcb77;
    --blue: #4d96ff;
    --text: #f1f1f1;
    --text-muted: #a0a0b8;
    --radius: 20px;
}

body {
    font-family: 'Segoe UI', 'Comic Sans MS', Roboto, sans-serif;
    background: var(--bg);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

/* Title */
.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--gold), var(--green), var(--blue));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Scoreboard */
.scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.score {
    background: var(--card);
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    min-width: 100px;
    border: 2px solid transparent;
}

.score.you { border-color: var(--blue); }
.score.computer { border-color: var(--accent); }

.score-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    transition: transform 0.2s;
}

.score.you .score-value { color: var(--blue); }
.score.computer .score-value { color: var(--accent); }

.score-vs {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-muted);
}

.pulse {
    animation: pulse-pop 0.4s ease;
}

@keyframes pulse-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Arena */
.arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 140px;
}

.fighter {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    min-width: 120px;
    border: 3px solid transparent;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.fighter.winner {
    border-color: var(--green);
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(107, 203, 119, 0.3);
}

.fighter.loser {
    opacity: 0.5;
    transform: scale(0.95);
}

.fighter-emoji {
    font-size: 4rem;
    line-height: 1.2;
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fighter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vs-burst {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    transition: transform 0.2s;
}

.vs-burst.bump {
    animation: bump 0.6s ease;
}

@keyframes bump {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3) rotate(-5deg); }
    50% { transform: scale(1.5) rotate(5deg); }
    75% { transform: scale(1.3) rotate(-3deg); }
}

/* Shake */
.shake {
    animation: shake 0.6s ease;
}

@keyframes shake {
    0%, 100% { transform: translateY(0); }
    20% { transform: translateY(-12px); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(-8px); }
    80% { transform: translateY(4px); }
}

/* Result */
.result {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    min-height: 2.5rem;
    transition: color 0.3s;
}

.result-win { color: var(--green); }
.result-lose { color: var(--accent); }
.result-tie { color: var(--gold); }

/* Choice Buttons */
.choices {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.choice-btn {
    background: var(--card);
    border: 3px solid var(--text-muted);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 110px;
    color: var(--text);
}

.choice-btn:hover {
    border-color: var(--gold);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 217, 61, 0.2);
}

.choice-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.choice-emoji {
    font-size: 3rem;
    line-height: 1;
}

.choice-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.streak {
    font-size: 1.1rem;
    font-weight: 700;
    min-height: 1.5rem;
    transition: color 0.3s;
    color: var(--gold);
}

.streak.on-fire {
    animation: fire-glow 0.6s ease infinite alternate;
}

@keyframes fire-glow {
    from { text-shadow: 0 0 8px rgba(255, 107, 107, 0.5); }
    to { text-shadow: 0 0 20px rgba(255, 107, 107, 0.8), 0 0 40px rgba(255, 217, 61, 0.4); }
}

.reset-btn {
    background: none;
    border: 1px solid var(--text-muted);
    border-radius: 12px;
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

/* Confetti */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: 30%;
    animation: confetti-fall linear forwards;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* Tablet */
@media (max-width: 500px) {
    .title { font-size: 1.8rem; }
    .choice-btn { min-width: 90px; padding: 1rem; }
    .choice-emoji { font-size: 2.5rem; }
    .fighter-emoji { font-size: 3rem; }
    .fighter { min-width: 90px; padding: 0.75rem; }
}

/* Mobile */
@media (max-width: 430px) {
    .game-container { padding: 1rem 0.75rem; }
    .title { font-size: 1.5rem; margin-bottom: 1rem; }

    .scoreboard { gap: 0.75rem; margin-bottom: 1rem; }
    .score { padding: 0.5rem 1rem; min-width: 80px; }
    .score-value { font-size: 1.8rem; }
    .score-vs { font-size: 1rem; }

    .arena { gap: 0.5rem; margin-bottom: 1rem; min-height: 100px; }
    .fighter { padding: 0.5rem; min-width: 80px; }
    .fighter-emoji { font-size: 2.5rem; min-height: 3.5rem; }
    .fighter-label { font-size: 0.75rem; }
    .vs-burst { font-size: 1.2rem; }

    .result { font-size: 1.1rem; margin-bottom: 1.25rem; }

    .choices { gap: 0.5rem; margin-bottom: 1.25rem; }
    .choice-btn { min-width: 0; flex: 1; padding: 0.75rem 0.5rem; }
    .choice-emoji { font-size: 2rem; }
    .choice-label { font-size: 0.8rem; }
}
