/* ============================================
   Halftime Screen - Arcade Scoreboard Style
   ============================================ */

#halftime-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(41, 121, 255, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 229, 255, 0.2) 0%, transparent 60%),
        linear-gradient(180deg, #0a1520 0%, #152535 50%, #0a1520 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

#halftime-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
    pointer-events: none;
}

.halftime-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

/* Halftime Banner */
.halftime-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: banner-entrance 0.6s ease-out;
}

.halftime-title-group {
    text-align: center;
}

.halftime-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 229, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0.5rem 0 0 0;
    animation: slide-up-fade 0.5s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.halftime-banner h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 5rem);
    color: white;
    text-shadow:
        0 0 10px rgba(0, 229, 255, 0.6),
        0 0 30px rgba(41, 121, 255, 0.4),
        4px 4px 0 #1565c0;
    margin: 0;
    letter-spacing: 0.08em;
    animation: halftime-glow 3s ease-in-out infinite alternate;
}

@keyframes halftime-glow {
    0% { text-shadow: 0 0 10px rgba(0, 229, 255, 0.6), 0 0 30px rgba(41, 121, 255, 0.4), 4px 4px 0 #1565c0; }
    100% { text-shadow: 0 0 20px rgba(0, 229, 255, 0.8), 0 0 45px rgba(41, 121, 255, 0.6), 4px 4px 0 #1565c0; }
}

.halftime-banner-stripe {
    width: 40px;
    height: 8px;
    background: linear-gradient(90deg, var(--accent-cyan), #1976d2);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

@keyframes banner-entrance {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up-fade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Halftime Scoreboard */
#halftime-screen .scoreboard {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 4px solid var(--accent-cyan);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-shadow:
        0 0 20px rgba(0, 229, 255, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    animation: scoreboard-entrance 0.6s ease-out;
}

@keyframes scoreboard-entrance {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.scoreboard-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.score-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.panel-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.player1-panel .panel-accent {
    background: linear-gradient(90deg, var(--primary-orange), var(--pop-yellow));
}

.player2-panel .panel-accent {
    background: linear-gradient(90deg, var(--accent-cyan), #0097a7);
}

.score-name {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    width: 100%;
    align-self: stretch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-value {
    display: inline-block;
    min-width: 2ch;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 14vw, 5.5rem);
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    animation: score-slam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: scale(1.5);
}

@keyframes score-slam {
    0% { transform: scale(1.5); opacity: 0; }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.player1-panel .score-value {
    color: var(--primary-orange);
}

.player2-panel .score-value {
    color: var(--accent-cyan);
}

/* Score Divider */
.score-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.divider-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.divider-dot:last-child {
    animation-delay: 0.5s;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.divider-line {
    width: 3px;
    height: 30px;
    background: linear-gradient(180deg, transparent, var(--accent-cyan), transparent);
}

/* Stats Section */
.halftime-stats {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--dark-brown);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: slide-up-fade 0.5s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(20px);
}

.halftime-stats h2 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--text-dark);
    text-shadow: none;
    text-transform: none;
}

/* Stats table grid layout */
.stats-table {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stats-header,
.stats-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.stats-header {
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--court-wood);
    margin-bottom: 0.25rem;
}

.stats-name {
    font-family: var(--font-display);
    font-size: 1rem;
}

.stats-name.player1 {
    text-align: right;
    color: var(--primary-orange);
}

.stats-name.player2 {
    text-align: left;
    color: var(--accent-cyan-dark);
}

.stats-label-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-row {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.stats-row:last-child {
    border-bottom: none;
}

.stat-label {
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-medium);
    min-width: 40px;
}

.stat-value {
    font-weight: 800;
    font-size: 0.9rem;
}

.stat-value.player1 {
    text-align: right;
    color: var(--primary-orange-dark);
}

.stat-value.player2 {
    text-align: left;
    color: var(--accent-cyan-dark);
}

/* ============================================
   Game Over Screen - Celebration Style
   ============================================ */

#game-over-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 107, 0, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 215, 0, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, #1a0a00 0%, #2d1b0e 50%, #1a0a00 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

#game-over-screen.player-won {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(76, 175, 80, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 215, 0, 0.5) 0%, transparent 60%),
        radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(76, 175, 80, 0.15) 0%, transparent 40%),
        linear-gradient(180deg, #0a1a0a 0%, #1b3d1b 50%, #0a1a0a 100%);
    animation: victory-glow 3s ease-in-out infinite alternate;
}

@keyframes victory-glow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.1); }
}

#game-over-screen.player-lost {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(100, 100, 100, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(60, 60, 60, 0.15) 0%, transparent 60%),
        linear-gradient(180deg, #151515 0%, #1f1f1f 50%, #151515 100%);
    filter: saturate(0.7);
}

/* Confetti Container */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -20px;
    animation: confetti-fall var(--fall-duration, 3s) ease-out forwards;
    animation-delay: var(--fall-delay, 0s);
}

.confetti.square {
    width: var(--size, 10px);
    height: var(--size, 10px);
    border-radius: 2px;
}

.confetti.circle {
    width: var(--size, 10px);
    height: var(--size, 10px);
    border-radius: 50%;
}

.confetti.rectangle {
    width: var(--size, 10px);
    height: calc(var(--size, 10px) * 0.4);
    border-radius: 1px;
}

.confetti.star {
    width: var(--size, 10px);
    height: var(--size, 10px);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(var(--rotation, 720deg)) scale(0.8);
        opacity: 0;
    }
}

.confetti.sparkle {
    background: radial-gradient(circle, white 30%, transparent 70%);
    animation: confetti-sparkle var(--fall-duration, 3s) ease-out forwards;
}

@keyframes confetti-sparkle {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateY(10vh) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
}

.game-over-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

/* Winner Banner */
.winner-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    animation: banner-entrance 0.6s ease-out;
}

.trophy-icon {
    font-size: 5rem;
    animation: trophy-bounce 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
}

@keyframes trophy-bounce {
    0%, 100% { transform: translateY(0) scale(1) rotate(-3deg); }
    50% { transform: translateY(-15px) scale(1.15) rotate(3deg); }
}

.winner-banner.won .trophy-icon {
    animation: trophy-bounce 0.8s ease-in-out infinite, trophy-rainbow 3s linear infinite;
}

@keyframes trophy-rainbow {
    0% { filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.8)); }
    16% { filter: drop-shadow(0 0 30px rgba(255, 165, 0, 0.8)); }
    33% { filter: drop-shadow(0 0 30px rgba(255, 255, 0, 0.8)); }
    50% { filter: drop-shadow(0 0 30px rgba(0, 255, 0, 0.8)); }
    66% { filter: drop-shadow(0 0 30px rgba(0, 191, 255, 0.8)); }
    83% { filter: drop-shadow(0 0 30px rgba(138, 43, 226, 0.8)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.8)); }
}

.winner-banner.lost .trophy-icon {
    filter: grayscale(1) opacity(0.5);
    animation: trophy-droop 2s ease-in-out forwards;
    font-size: 3rem;
}

@keyframes trophy-droop {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(5px) rotate(-8deg); }
}

.winner-banner h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 5rem);
    margin: 0.5rem 0;
    letter-spacing: 0.08em;
}

.winner-banner.won h1 {
    color: #4ADE80;
    text-shadow:
        0 0 15px rgba(74, 222, 128, 0.9),
        0 0 40px rgba(74, 222, 128, 0.7),
        0 0 60px rgba(74, 222, 128, 0.4),
        5px 5px 0 #166534;
    animation: victory-text-pulse 1.5s ease-in-out infinite;
}

@keyframes victory-text-pulse {
    0%, 100% { text-shadow: 0 0 15px rgba(74, 222, 128, 0.9), 0 0 40px rgba(74, 222, 128, 0.7), 5px 5px 0 #166534; }
    50% { text-shadow: 0 0 25px rgba(74, 222, 128, 1), 0 0 60px rgba(74, 222, 128, 0.9), 0 0 80px rgba(255, 215, 0, 0.5), 5px 5px 0 #166534; }
}

.winner-banner.lost h1 {
    color: #888;
    text-shadow: 4px 4px 0 #333;
    animation: defeat-droop 1s ease-out forwards;
}

@keyframes defeat-droop {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

.winner-banner.tie h1 {
    color: var(--pop-yellow);
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 30px rgba(255, 215, 0, 0.6),
        4px 4px 0 #ff8f00;
}

.winner-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Final Scoreboard */
.final-scoreboard {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 4px solid var(--pop-yellow);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.final-scoreboard-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.final-score-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.final-score-panel .panel-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.final-score-panel.player1-panel .panel-accent {
    background: linear-gradient(90deg, var(--primary-orange), var(--pop-yellow));
}

.final-score-panel.player2-panel .panel-accent {
    background: linear-gradient(90deg, var(--accent-cyan), #0097a7);
}

.winner-crown {
    font-size: 2rem;
    display: none;
    animation: crown-appear 0.5s ease-out 0.3s both;
}

@keyframes crown-appear {
    0% { transform: translateY(-20px) scale(0); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.final-score-panel.is-winner .winner-crown {
    display: block;
}

.final-player-name {
    display: block;
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.final-score-number {
    display: inline-block;
    min-width: 2ch;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 14vw, 5.5rem);
    line-height: 1;
    text-shadow:
        0 0 20px currentColor,
        4px 4px 0 rgba(0, 0, 0, 0.4);
    animation: score-slam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: scale(1.5);
}

.final-score-panel.player1-panel .final-score-number {
    color: var(--primary-orange);
}

.final-score-panel.player2-panel .final-score-number {
    color: var(--accent-cyan);
}

/* Winner panel - glow and pulse */
.final-score-panel.is-winner {
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    animation: winner-panel-pulse 2s ease-in-out infinite;
}

@keyframes winner-panel-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(74, 222, 128, 0.3); }
}

.final-score-panel.is-winner .final-score-number {
    animation: score-slam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, winner-score-glow 1.5s ease-in-out infinite;
    animation-delay: 0.3s, 0.8s;
}

@keyframes winner-score-glow {
    0%, 100% { text-shadow: 0 0 20px currentColor, 4px 4px 0 rgba(0, 0, 0, 0.4); }
    50% { text-shadow: 0 0 30px currentColor, 0 0 50px rgba(255, 215, 0, 0.5), 4px 4px 0 rgba(0, 0, 0, 0.4); }
}

/* Loser panel - faded and muted */
.final-score-panel:not(.is-winner) {
    opacity: 0.7;
    filter: saturate(0.6);
}

/* VS Divider */
.final-vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.5rem;
}

.final-text {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--pop-yellow);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 0.1em;
}

/* Final Stats */
.final-stats {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--dark-brown);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.final-stats h2 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--text-dark);
}

/* ============================================
   Overtime Screen - Dramatic Transition
   ============================================ */

#overtime-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(244, 67, 54, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 193, 7, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 20% 30%, rgba(244, 67, 54, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 193, 7, 0.2) 0%, transparent 40%),
        linear-gradient(180deg, #1a0500 0%, #3d1b0e 50%, #1a0500 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

#overtime-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(244, 67, 54, 0.25) 0%, transparent 60%);
    animation: overtime-heartbeat 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes overtime-heartbeat {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    15% { transform: scale(1.15); opacity: 0.8; }
    30% { transform: scale(1); opacity: 0.3; }
    45% { transform: scale(1.1); opacity: 0.6; }
    60%, 100% { transform: scale(1); opacity: 0.3; }
}

.overtime-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.overtime-flash {
    position: fixed;
    inset: 0;
    background: white;
    animation: overtime-flash 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes overtime-flash {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

.overtime-badge {
    background: linear-gradient(180deg, var(--danger-red) 0%, #b71c1c 100%);
    border: 4px solid #ffeb3b;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.5rem;
    margin-bottom: var(--space-lg);
    box-shadow:
        0 0 20px rgba(255, 235, 59, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.4);
    animation: badge-glow 1.5s ease-in-out infinite alternate;
}

@keyframes badge-glow {
    0% { box-shadow: 0 0 20px rgba(255, 235, 59, 0.5), 0 4px 15px rgba(0, 0, 0, 0.4); }
    100% { box-shadow: 0 0 35px rgba(255, 235, 59, 0.8), 0 4px 15px rgba(0, 0, 0, 0.4); }
}

.overtime-badge span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
}

.overtime-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 14vw, 6rem);
    color: white;
    text-shadow:
        0 0 15px rgba(244, 67, 54, 0.9),
        0 0 35px rgba(244, 67, 54, 0.7),
        0 0 55px rgba(255, 193, 7, 0.5),
        5px 5px 0 #b71c1c;
    margin: 0 0 var(--space-sm) 0;
    animation: overtime-title-pulse 0.8s ease-in-out infinite;
    letter-spacing: 0.1em;
}

@keyframes overtime-title-pulse {
    0%, 100% { transform: scale(1); text-shadow: 0 0 15px rgba(244, 67, 54, 0.9), 0 0 35px rgba(244, 67, 54, 0.7), 5px 5px 0 #b71c1c; }
    50% { transform: scale(1.02); text-shadow: 0 0 25px rgba(244, 67, 54, 1), 0 0 50px rgba(244, 67, 54, 0.9), 0 0 70px rgba(255, 193, 7, 0.6), 5px 5px 0 #b71c1c; }
}

.overtime-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pop-yellow);
    margin: 0 0 var(--space-xl) 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.overtime-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.overtime-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.overtime-score-item span:first-child {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.overtime-score-value {
    display: inline-block;
    min-width: 2ch;
    text-align: center;
    font-family: var(--font-display);
    font-size: 4.5rem;
    line-height: 1;
    text-shadow:
        0 0 15px currentColor,
        3px 3px 0 rgba(0, 0, 0, 0.4);
    animation: score-slam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.overtime-score-item.player .overtime-score-value {
    color: var(--primary-orange);
}

.overtime-score-item.opponent .overtime-score-value {
    color: var(--accent-cyan);
}

.overtime-tied {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--pop-yellow);
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid var(--pop-yellow);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.75rem;
    animation: tied-pulse 1s ease-in-out infinite;
}

@keyframes tied-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.overtime-info {
    margin-bottom: var(--space-xl);
}

.overtime-info p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 var(--space-xs) 0;
}

.overtime-info .overtime-cards {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.overtime-info .overtime-cards span {
    color: var(--pop-yellow);
    font-weight: 800;
}

.btn-overtime {
    font-size: 1.35rem;
    padding: 1.25rem 3.5rem;
    background: linear-gradient(180deg, #ff5252 0%, var(--danger-red) 100%);
    border-color: #b71c1c;
    box-shadow: 6px 6px 0 #b71c1c;
    animation: btn-urgent-pulse 1s ease-in-out infinite;
}

@keyframes btn-urgent-pulse {
    0%, 100% { box-shadow: 6px 6px 0 #b71c1c; transform: scale(1); }
    50% { box-shadow: 6px 6px 0 #b71c1c, 0 0 30px rgba(244, 67, 54, 0.6); transform: scale(1.02); }
}

/* ============================================
   Half-Start Discard Screen
   ============================================ */

#discard-screen {
    background: linear-gradient(
        135deg,
        #1a1a2e 0%,
        #16213e 40%,
        #0f3460 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

#discard-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(227, 100, 20, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(100, 200, 255, 0.1) 0%, transparent 50%);
    animation: discard-bg-shift 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes discard-bg-shift {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.discard-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.discard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.discard-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e36414, #c44d00);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    box-shadow:
        0 4px 20px rgba(227, 100, 20, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    animation: badge-bounce 2s ease-in-out infinite;
}

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

.discard-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.discard-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--primary-orange);
    margin: 0 0 var(--space-xs) 0;
    text-shadow:
        0 0 20px rgba(227, 100, 20, 0.5),
        2px 2px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

.discard-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.discard-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(4px);
}

.discard-explanation {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: center;
}

.discard-explanation strong {
    color: var(--pop-yellow);
    font-weight: 800;
}

/* Cards container - 3x2 grid */
.discard-hand {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 0.5rem;
    max-width: 360px;
    margin: 0 auto var(--space-md);
    width: 100%;
}

.discard-hand .card {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    opacity: 1;
}

.discard-hand .card:hover {
    transform: translateY(-12px) scale(1.08);
    box-shadow:
        0 12px 30px rgba(255, 100, 100, 0.4),
        0 0 20px rgba(255, 100, 100, 0.3);
    z-index: 10;
}

.discard-hand .card::after {
    content: 'DISCARD';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger-red);
    color: white;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.discard-hand .card:hover::after {
    opacity: 1;
}

.discard-hint {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: var(--space-sm) 0 0 0;
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.discard-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discard-waiting p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.discard-waiting span {
    color: var(--accent-cyan);
    font-weight: 700;
}

.waiting-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spinner-rotate 1s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

.discard-hand .card.selected {
    animation: card-selected 0.3s ease forwards;
}

@keyframes card-selected {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1) rotate(-5deg); opacity: 0.8; }
    100% { transform: scale(0.8) translateY(-20px); opacity: 0; }
}
