/* Match Sticks Game - Ember Glow Aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Pro:wght@300;400;500&display=swap');

:root {
    --ember-bright: #ff7a8a;
    --ember-core: #d9485a;
    --ember-deep: #8f2436;
    --ember-glow: rgba(217, 72, 90, 0.4);
    --ash-dark: #0a0a0f;
    --ash-medium: #151520;
    --ash-light: #1e1e2a;
    --smoke: #2a2a3a;
    --coal: #111118;
    --cream: #f5e6d3;
    --cream-dim: #c4b5a4;
    --board-dot: rgba(220, 225, 240, 0.08);
    --board-dot-soft: rgba(180, 188, 210, 0.05);
}

body {
    background: var(--coal);
}

.game-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-top: 80px;
    background: var(--coal);
    position: relative;
    overflow: hidden;
}

/* Subtle animated grain texture */
.game-wrapper::before {
    content: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(/%23noise)'/%3E%3C/svg%3E");
}

/* Floating ambient dots */
.game-wrapper::after {
    content: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(220, 228, 240, 0.45), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(210, 218, 235, 0.38), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(220, 228, 240, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 15% 80%, rgba(210, 218, 235, 0.34), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(195, 205, 225, 0.3), transparent);
    animation: floatEmbers 24s ease-in-out infinite;
    opacity: 0.45;
}

@keyframes floatEmbers {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    25% { transform: translateY(-10px) rotate(1deg); opacity: 0.4; }
    50% { transform: translateY(-5px) rotate(-1deg); opacity: 0.7; }
    75% { transform: translateY(-15px) rotate(0.5deg); opacity: 0.5; }
}

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

.game-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.game-info h1 {
    font-family: 'Cinzel', serif;
    color: var(--cream);
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow:
        0 0 40px var(--ember-glow),
        0 0 80px rgba(217, 72, 90, 0.28),
        0 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
}

.game-info h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember-core), transparent);
}

.attempt-counter {
    margin: 0;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--cream-dim);
    text-align: center;
}

.attempt-pill {
    display: inline-block;
    min-width: 1.7em;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    color: #fff4e6;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(217, 72, 90, 0.45);
    box-shadow: 0 0 14px rgba(217, 72, 90, 0.35);
}

.counter-sep {
    color: #8d7d6b;
    margin: 0 6px;
}

.diff-btn {
    padding: 12px 28px;
    border: 1px solid var(--smoke);
    background: linear-gradient(180deg, var(--ash-light) 0%, var(--ash-medium) 100%);
    color: var(--cream-dim);
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.diff-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(217, 72, 90, 0.12) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.diff-btn:hover {
    border-color: var(--ember-core);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 72, 90, 0.18);
}

.diff-btn:hover::before {
    opacity: 1;
}

.diff-btn.active {
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border-color: var(--ember-bright);
    color: var(--ash-dark);
    font-weight: 500;
    box-shadow:
        0 0 20px var(--ember-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Game Area */
.game-area {
    width: 100%;
    aspect-ratio: 1;
    max-width: 500px;
    background:
        radial-gradient(ellipse at center, #1b1f2d 0%, #0f111a 72%),
        var(--coal);
    border-radius: 14px;
    box-shadow:
        0 0 0 1px rgba(203, 214, 235, 0.12),
        0 0 60px rgba(18, 24, 40, 0.65),
        inset 0 0 110px rgba(0, 0, 0, 0.55),
        0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.game-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(230, 238, 255, 0.06) 0%, rgba(230, 238, 255, 0) 60%),
        repeating-radial-gradient(circle at center, transparent 0 14px, rgba(198, 208, 230, 0.04) 14px 15px);
    z-index: 0;
    pointer-events: none;
}

.game-area::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(var(--board-dot) 1.1px, transparent 1.1px),
        radial-gradient(var(--board-dot-soft) 0.9px, transparent 0.9px);
    background-size: 22px 22px, 22px 22px;
    background-position: 0 0, 11px 11px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}

#gameCanvas {
    max-width: 100%;
    max-height: 100%;
    position: relative;
    z-index: 1;
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    padding: 14px 32px;
    border: none;
    background: linear-gradient(180deg, var(--ash-light) 0%, var(--ash-medium) 100%);
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--smoke);
    position: relative;
    overflow: hidden;
}

.control-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--ember-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.control-btn:hover {
    border-color: var(--ember-core);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 72, 90, 0.22);
}

.control-btn:hover::after {
    width: 200%;
    height: 200%;
}

.control-btn:active {
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(217, 72, 90, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, var(--ash-light) 0%, var(--ash-dark) 100%);
    padding: 48px 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 0 0 1px rgba(217, 72, 90, 0.28),
        0 0 80px rgba(217, 72, 90, 0.18),
        0 40px 80px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ember-core), transparent);
}

.modal-content h2 {
    font-family: 'Cinzel', serif;
    color: var(--cream);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    letter-spacing: 0.12em;
    text-shadow: 0 0 30px var(--ember-glow);
}

.instructions {
    color: var(--cream-dim);
    margin-bottom: 32px;
    line-height: 2;
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
}

.instructions p {
    margin: 10px 0;
}

.red-text {
    color: var(--ember-core);
    font-weight: 500;
    text-shadow: 0 0 10px var(--ember-glow);
}

.green-text {
    color: #4ade80;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.difficulty-select h3 {
    font-family: 'Cinzel', serif;
    color: var(--ember-bright);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.diff-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.start-btn {
    padding: 16px 36px;
    border: 1px solid var(--ember-core);
    background: linear-gradient(180deg, rgba(217, 72, 90, 0.18) 0%, rgba(143, 36, 54, 0.12) 100%);
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.start-btn:hover {
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border-color: var(--ember-bright);
    transform: scale(1.02);
    box-shadow:
        0 0 30px var(--ember-glow),
        0 10px 40px rgba(217, 72, 90, 0.32);
}

.start-btn:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 600px) {
    .game-wrapper {
        padding: 10px;
        padding-top: 70px;
    }

    .game-info h1 {
        font-size: 1.6rem;
        letter-spacing: 0.1em;
    }

    .attempt-counter {
        font-size: 0.9rem;
        letter-spacing: 0.04em;
    }

    .diff-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .game-area {
        max-width: 100%;
        border-radius: 6px;
    }

    .modal-content {
        padding: 32px 24px;
    }

    .modal-content h2 {
        font-size: 1.6rem;
    }

    .instructions {
        font-size: 1rem;
        line-height: 1.8;
    }

    .control-btn {
        width: auto;
        padding: 12px 24px;
    }
}

/* ============================================
   MULTIPLAYER STYLES
   ============================================ */

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 400px;
}

.mode-btn {
    flex: 1;
    padding: 14px 24px;
    border: 1px solid var(--smoke);
    background: linear-gradient(180deg, var(--ash-light) 0%, var(--ash-medium) 100%);
    color: var(--cream-dim);
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    border-color: var(--ember-core);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(217, 72, 90, 0.18);
}

.mode-btn.active {
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border-color: var(--ember-bright);
    color: #fff4e6;
    font-weight: 500;
    box-shadow:
        0 0 20px var(--ember-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Name Input Screen */
.game-subtitle {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--cream-dim);
    text-align: center;
    margin: 0;
}

.game-hint {
    font-family: 'Crimson Pro', serif;
    font-size: 0.85rem;
    color: #9a8b7a;
    text-align: center;
    margin: 8px 0 0 0;
    font-style: italic;
}

.name-input-container {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
}

.name-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 4px;
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: var(--ember-core);
    box-shadow: 0 0 20px var(--ember-glow);
}

.name-input::placeholder {
    color: var(--cream-dim);
    opacity: 0.6;
}

/* Lobby Screen */
.lobby-section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 24px;
}

.lobby-label {
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    color: var(--cream-dim);
    text-align: center;
    margin-bottom: 12px;
}

.share-link-container {
    display: flex;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--ash-dark);
    border: 1px solid var(--smoke);
    border-radius: 4px;
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
}

.btn-icon {
    padding: 12px 20px;
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border: none;
    border-radius: 4px;
    color: #fff4e6;
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    box-shadow: 0 0 20px var(--ember-glow);
    transform: translateY(-2px);
}

.status-text {
    text-align: center;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--cream);
}

.lobby-leaderboard {
    width: 100%;
    max-width: 500px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.lobby-leaderboard h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--ember-bright);
    margin: 0 0 16px 0;
    text-align: center;
}

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--ash-dark);
    border-radius: 4px;
}

.score-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Crimson Pro', serif;
    color: var(--cream);
}

.player-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.host-badge {
    font-size: 0.8rem;
    color: var(--ember-bright);
}

.score-value {
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ember-bright);
}

.lobby-controls {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.waiting-text {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--cream-dim);
    text-align: center;
}

.control-btn.primary {
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border: 1px solid var(--ember-bright);
    color: #fff4e6;
    box-shadow: 0 0 20px var(--ember-glow);
}

.control-btn.secondary {
    background: linear-gradient(180deg, var(--ash-light) 0%, var(--ash-medium) 100%);
    border: 1px solid var(--smoke);
    color: var(--cream-dim);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Game Header */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
    margin-bottom: 16px;
    gap: 12px;
}

.back-btn {
    padding: 8px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 4px;
    color: var(--cream);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    border-color: var(--ember-core);
    box-shadow: 0 0 10px var(--ember-glow);
}

.game-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--cream);
    margin: 0;
    flex: 1;
    text-align: left;
}

.stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    order: 10;
}

.round-pill {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border-radius: 999px;
    color: #fff4e6;
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 0 14px rgba(217, 72, 90, 0.35);
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 4px;
    color: var(--cream);
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: var(--ember-core);
    box-shadow: 0 0 10px var(--ember-glow);
}

.share-btn.copied {
    background: linear-gradient(180deg, var(--ember-core) 0%, var(--ember-deep) 100%);
    border-color: var(--ember-bright);
    box-shadow: 0 0 20px var(--ember-glow);
}

/* Game Timer */
.game-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    order: 11;
}

.timer-bar {
    width: 200px;
    height: 10px;
    background: var(--ash-dark);
    border-radius: 5px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ember-core), var(--ember-bright));
    transition: width 1s linear, background 0.3s ease;
}

.timer-fill.warning {
    background: linear-gradient(90deg, #f39c12, #f1c40f);
}

.timer-fill.danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    animation: pulse 0.5s infinite;
}

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

#timer-text {
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cream);
}

/* Player Indicators */
.player-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.player-indicator {
    padding: 8px 16px;
    background: var(--ash-light);
    border: 2px solid var(--smoke);
    border-radius: 4px;
    font-family: 'Crimson Pro', serif;
    font-size: 0.9rem;
    color: var(--cream-dim);
    transition: all 0.3s ease;
}

.player-indicator.locked {
    border-color: var(--ember-core);
    background: linear-gradient(180deg, rgba(217, 72, 90, 0.2) 0%, rgba(143, 36, 54, 0.1) 100%);
    color: var(--ember-bright);
    box-shadow: 0 0 14px rgba(217, 72, 90, 0.3);
}

/* Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.countdown-number {
    font-family: 'Cinzel', serif;
    font-size: 8rem;
    font-weight: 700;
    color: var(--ember-bright);
    text-shadow: 0 0 60px var(--ember-glow);
    animation: countdownPulse 1s ease-in-out;
}

@keyframes countdownPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Game Complete Overlay */
.game-complete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.92);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 14px;
    backdrop-filter: blur(4px);
}

.complete-content {
    text-align: center;
    padding: 20px;
}

.complete-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #4ade80;
    margin: 0 0 12px 0;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.5);
}

.complete-attempts {
    font-family: 'Crimson Pro', serif;
    font-size: 1.2rem;
    color: var(--cream);
    margin: 0 0 24px 0;
}

.complete-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.complete-buttons .control-btn {
    min-width: 160px;
}

.complete-waiting {
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    color: var(--cream-dim);
}

.complete-waiting p {
    margin: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Multiplayer Round Results */
.mp-round-results {
    width: 100%;
    max-width: 500px;
    margin-top: 24px;
}

.mp-round-results h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--ember-bright);
    text-align: center;
    margin-bottom: 16px;
}

.round-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.result-row.winner {
    border-color: var(--ember-core);
    background: linear-gradient(180deg, rgba(217, 72, 90, 0.2) 0%, rgba(143, 36, 54, 0.1) 100%);
    box-shadow: 0 0 14px rgba(217, 72, 90, 0.25);
}

.result-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--cream);
    flex: 1;
}

.result-stats {
    display: flex;
    gap: 16px;
    font-family: 'Crimson Pro', serif;
    font-size: 0.95rem;
    color: var(--cream-dim);
}

.result-burned {
    font-weight: 600;
    color: var(--ember-bright);
}

.result-attempts {
    color: var(--cream-dim);
}

.result-points {
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cream-dim);
    min-width: 30px;
    text-align: right;
}

.result-points.gained {
    color: var(--ember-bright);
}

.next-round-msg {
    text-align: center;
    font-family: 'Crimson Pro', serif;
    font-size: 1.15rem;
    color: var(--cream-dim);
}

/* Session End Screen */
.final-leaderboard {
    width: 100%;
    max-width: 500px;
    background: var(--ash-light);
    border: 1px solid var(--smoke);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.final-standings {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.standing-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--ash-dark);
    border: 1px solid var(--smoke);
    border-radius: 4px;
}

.standing-row.first {
    border-color: #f1c40f;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
}

.standing-row.second {
    border-color: #95a5a6;
    box-shadow: 0 0 15px rgba(149, 165, 166, 0.2);
}

.standing-row.third {
    border-color: #cd7f32;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.2);
}

.standing-rank {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ember-bright);
    min-width: 40px;
}

.standing-player {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Crimson Pro', serif;
    font-size: 1.1rem;
    color: var(--cream);
}

.standing-score {
    font-family: 'Crimson Pro', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ember-bright);
}

.session-stats {
    text-align: center;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    color: var(--cream-dim);
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .mode-selector {
        flex-direction: column;
        gap: 10px;
    }

    .game-header {
        flex-wrap: wrap;
    }

    .game-header h2 {
        font-size: 1.2rem;
    }

    .stats {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .countdown-number {
        font-size: 5rem;
    }

    .player-indicators {
        gap: 8px;
    }

    .player-indicator {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

.hidden {
    display: none !important;
}
