/* ========== PROFESSIONAL GAME EXPERIENCE ========== */

/* Full-screen Game Overlay */
.game-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.97) 0%, rgba(10, 10, 20, 0.99) 100%);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.game-overlay.visible {
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Game Top Bar */
.game-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.game-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.game-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.game-back-btn svg {
    width: 22px;
    height: 22px;
}

.game-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-title svg {
    width: 26px;
    height: 26px;
    color: #0a84ff;
}

.game-live-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.2), rgba(48, 209, 88, 0.1));
    border: 1px solid rgba(48, 209, 88, 0.4);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #32d74b;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.game-live-badge .dot {
    width: 8px;
    height: 8px;
    background: #32d74b;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* Game Main Area */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ===== GAME LOBBY ===== */
.game-lobby {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 32px;
}

.game-lobby.hidden {
    display: none;
}

.lobby-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 15px 40px rgba(10, 132, 255, 0.3);
}

.lobby-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.lobby-header {
    text-align: center;
}

.lobby-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.lobby-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    max-width: 280px;
}

/* Game Selection Cards */
.game-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 420px;
}

.game-select-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 28px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-select-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-select-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #0a84ff;
    box-shadow: 0 25px 50px rgba(10, 132, 255, 0.25);
}

.game-select-card:hover::before {
    opacity: 1;
}

.game-select-card:active {
    transform: translateY(-4px) scale(0.98);
}

.game-card-emoji {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.game-select-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.game-select-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

/* Partner Invited Badge */
.invite-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #32d74b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: invite-bounce 1s infinite;
}

@keyframes invite-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* ===== GAME ARENA ===== */
.game-arena {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.game-arena.active {
    display: flex;
}

/* Player Scoreboard */
.scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
}

.player-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.player-card.reverse {
    flex-direction: row-reverse;
}

.player-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    position: relative;
}

.player-avatar.you {
    background: linear-gradient(135deg, #0a84ff, #5856d6);
    color: white;
}

.player-avatar.them {
    background: linear-gradient(135deg, #ff453a, #ff9500);
    color: white;
}

.player-avatar .turn-ring {
    position: absolute;
    inset: -4px;
    border: 3px solid #32d74b;
    border-radius: 20px;
    animation: turn-glow 1s infinite;
    display: none;
}

.player-avatar.active .turn-ring {
    display: block;
}

@keyframes turn-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(48, 209, 88, 0.5);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(48, 209, 88, 0.3);
    }
}

.player-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.player-score-display {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.player-score-display strong {
    font-size: 20px;
    font-weight: 700;
    margin-left: 4px;
}

.player-card.you .player-score-display strong {
    color: #0a84ff;
}

.player-card.them .player-score-display strong {
    color: #ff453a;
}

.vs-divider {
    text-align: center;
}

.vs-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
}

/* Turn Status Bar */
.turn-status {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.turn-status-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.turn-status-inner.your-turn {
    background: rgba(10, 132, 255, 0.15);
    color: #0a84ff;
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.turn-status-inner.their-turn {
    background: rgba(255, 159, 10, 0.12);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.25);
}

.turn-status-inner svg {
    width: 18px;
    height: 18px;
}

/* Game Board Area */
.game-board-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

/* ===== TIC TAC TOE ===== */
.ttt-game {
    width: 100%;
    max-width: 320px;
}

.ttt-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 28px;
}

.ttt-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    position: relative;
}

.ttt-cell:hover:not(.taken) {
    transform: scale(1.08);
    border-color: #0a84ff;
    background: rgba(10, 132, 255, 0.08);
}

.ttt-cell.taken {
    cursor: default;
}

.ttt-cell.x {
    color: #0a84ff;
    text-shadow: 0 0 40px rgba(10, 132, 255, 0.6);
}

.ttt-cell.o {
    color: #ff453a;
    text-shadow: 0 0 40px rgba(255, 69, 58, 0.6);
}

.ttt-cell.winning {
    animation: cell-win 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(48, 209, 88, 0.15);
    border-color: #32d74b;
}

@keyframes cell-win {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.game-action-btn {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-action-btn:hover {
    background: #0a84ff;
    border-color: #0a84ff;
    transform: translateY(-2px);
}

.game-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Game Result Modal */
.game-result-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 10;
    animation: modal-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-result-modal.visible {
    display: flex;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-icon {
    font-size: 96px;
    animation: result-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes result-pop {
    0% {
        transform: scale(0) rotate(-20deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.result-title {
    font-size: 36px;
    font-weight: 800;
}

.result-title.won {
    background: linear-gradient(135deg, #32d74b, #30d158);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-title.lost {
    color: #ff453a;
}

.result-title.draw {
    color: #ff9f0a;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.result-btn {
    padding: 16px 36px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-btn.primary {
    background: #0a84ff;
    color: white;
}

.result-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(10, 132, 255, 0.4);
}

.result-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.result-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.result-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== WOULD YOU RATHER ===== */
.wyr-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    overflow-y: auto;
}

.wyr-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.wyr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0a84ff, #bf5af2);
    width: 10%;
    transition: width 0.5s ease;
    border-radius: 2px;
}

.wyr-question-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 0;
}

.wyr-category-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.wyr-category-badge svg {
    width: 14px;
    height: 14px;
    color: #0a84ff;
}

.wyr-question-header {
    text-align: center;
}

.wyr-question-label {
    font-size: 24px;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 6px;
}

.wyr-question-number {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.wyr-choices {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    gap: 14px;
    position: relative;
}

.wyr-choice-btn {
    position: relative;
    padding: 20px 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.wyr-choice-btn:hover:not(.selected):not(.revealed) {
    transform: translateY(-4px) scale(1.02);
    border-color: #0a84ff;
}

.wyr-choice-btn.selected {
    border-color: #32d74b;
    background: linear-gradient(160deg, rgba(48, 209, 88, 0.2) 0%, rgba(48, 209, 88, 0.05) 100%);
}

.wyr-choice-emoji {
    font-size: 32px;
    margin-bottom: 10px;
}

.wyr-choice-text {
    font-size: 15px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

.wyr-choice-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: #32d74b;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.wyr-choice-btn.selected .wyr-choice-indicator {
    display: flex;
}

.wyr-choice-indicator svg {
    width: 14px;
    height: 14px;
    color: white;
}

.wyr-vs-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.wyr-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.wyr-action-btn {
    padding: 12px 24px;
    background: #0a84ff;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wyr-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wyr-action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.wyr-action-btn svg {
    width: 16px;
    height: 16px;
}

.wyr-session-score {
    display: flex;
    justify-content: center;
    gap: 36px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    flex-shrink: 0;
}

.wyr-score-item {
    text-align: center;
}

.wyr-score-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.wyr-score-value {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.wyr-score-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* Session Stats */
.session-stats {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 500px) {
    .game-selection {
        gap: 12px;
    }

    .game-select-card {
        padding: 24px 16px;
    }

    .game-card-emoji {
        font-size: 40px;
    }

    .ttt-cell {
        font-size: 22px;
        border-radius: 10px;
    }

    .ttt-grid {
        gap: 6px;
    }

    .scoreboard {
        padding: 12px 16px;
    }

    .player-avatar {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* ===== CONNECT FOUR ===== */

.c4-game {
    width: 100%;
    max-width: 350px;
}

/* Column Indicators */
.c4-column-indicators {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.c4-column-indicator {
    height: 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c4-column-indicator.red {
    background: rgba(255, 69, 58, 0.3);
}

.c4-column-indicator.yellow {
    background: rgba(255, 214, 10, 0.3);
}

.c4-column-indicator.active {
    transform: scale(1.1);
}

.c4-column-indicator.active::after {
    content: '↓';
    font-size: 14px;
    color: white;
    animation: bounce-arrow 0.5s infinite;
}

@keyframes bounce-arrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

/* Connect Four Grid */
.c4-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: linear-gradient(180deg, #1a3a7a 0%, #0d2451 100%);
    padding: 10px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.c4-cell {
    aspect-ratio: 1;
    background: #0a1630;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5);
    transition: background 0.1s;
}

.c4-cell:hover:not(.taken) {
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 255, 255, 0.2);
}

/* RED DISC */
.c4-cell.taken.red {
    background: radial-gradient(circle at 35% 35%, #ff8080, #ff453a 60%, #b02020);
}

/* YELLOW DISC */
.c4-cell.taken.yellow {
    background: radial-gradient(circle at 35% 35%, #ffee80, #ffd60a 60%, #b09500);
}

/* Hover preview */
.c4-cell.hover-preview.red {
    background: rgba(255, 69, 58, 0.35);
}

.c4-cell.hover-preview.yellow {
    background: rgba(255, 214, 10, 0.35);
}

.c4-cell.taken {
    cursor: default;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

/* Drop animation - realistic gravity with bounce */
.c4-cell.drop {
    animation: drop-disc 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes drop-disc {
    0% {
        opacity: 0;
        transform: translateY(-150px) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translateY(8px) scale(1);
    }

    70% {
        transform: translateY(-4px) scale(1);
    }

    85% {
        transform: translateY(2px) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Winning cells - glowing with checkmark */
.c4-cell.winning {
    z-index: 10;
    box-shadow: 0 0 20px 8px rgba(48, 209, 88, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse-win 0.5s ease-in-out infinite alternate;
}

/* Checkmark overlay on winning cells */
.c4-cell.winning::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: check-appear 0.3s ease-out;
    z-index: 11;
}

@keyframes check-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    60% {
        transform: translate(-50%, -50%) scale(1.3);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes pulse-win {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px 8px rgba(48, 209, 88, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    }

    100% {
        transform: scale(1.1);
        box-shadow: 0 0 30px 12px rgba(48, 209, 88, 1), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Player Avatar for C4 */
.c4-player-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.c4-player-avatar .c4-disc {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.c4-player-avatar.red .c4-disc {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #ff453a 50%, #cc2a22);
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.3), inset 0 3px 6px rgba(255, 255, 255, 0.2);
}

.c4-player-avatar.yellow .c4-disc {
    background: radial-gradient(circle at 30% 30%, #ffe066, #ffd60a 50%, #ccaa00);
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.3), inset 0 3px 6px rgba(255, 255, 255, 0.2);
}

.c4-player-avatar .turn-ring {
    position: absolute;
    inset: -4px;
    border: 3px solid #32d74b;
    border-radius: 50%;
    animation: turn-glow 1s infinite;
    display: none;
}

.c4-player-avatar.active .turn-ring {
    display: block;
}

/* Responsive C4 */
@media (max-width: 400px) {
    .c4-grid {
        gap: 4px;
        padding: 8px;
        border-radius: 12px;
    }

    .c4-column-indicators {
        gap: 4px;
    }

    .c4-column-indicator {
        height: 20px;
    }

    .c4-cell::after {
        inset: 3px;
    }
}

/* ===== ROCK PAPER SCISSORS ===== */

.rps-game {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
}

/* Battle Arena */
.rps-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 24px;
    margin-bottom: 24px;
    position: relative;
}

/* Hand displays */
.rps-hand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rps-hand {
    width: 80px;
    height: 80px;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.rps-hand.selected {
    border-color: rgba(10, 132, 255, 0.5);
    background: rgba(10, 132, 255, 0.1);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.3);
}

.rps-hand.shake {
    animation: rps-shake 0.5s ease-in-out;
}

@keyframes rps-shake {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(-5deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.rps-hand.reveal {
    animation: rps-reveal 0.3s ease-out;
}

@keyframes rps-reveal {
    0% {
        transform: scale(0.5) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.rps-hand.revealed {
    animation: rps-pop 0.3s ease-out;
}

@keyframes rps-pop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.rps-hand-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* VS Indicator */
.rps-vs {
    font-size: 24px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    min-width: 50px;
    transition: all 0.3s;
}

.rps-vs.waiting {
    animation: rps-pulse 1s infinite;
}

@keyframes rps-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.rps-vs.win {
    color: #32d74b;
    text-shadow: 0 0 10px rgba(50, 215, 75, 0.5);
}

.rps-vs.lose {
    color: #ff453a;
    text-shadow: 0 0 10px rgba(255, 69, 58, 0.5);
}

.rps-vs.draw {
    color: #ff9f0a;
    text-shadow: 0 0 10px rgba(255, 159, 10, 0.5);
}

/* Round Result Banner */
.rps-round-result {
    display: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    animation: rps-result-in 0.4s ease-out;
}

.rps-round-result.visible {
    display: inline-block;
}

@keyframes rps-result-in {
    0% {
        transform: scale(0) translateY(-20px);
        opacity: 0;
    }

    60% {
        transform: scale(1.1) translateY(0);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.rps-round-result.win {
    background: linear-gradient(135deg, rgba(50, 215, 75, 0.2), rgba(50, 215, 75, 0.1));
    color: #32d74b;
    border: 1px solid rgba(50, 215, 75, 0.3);
}

.rps-round-result.lose {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.2), rgba(255, 69, 58, 0.1));
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.rps-round-result.draw {
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(255, 159, 10, 0.1));
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

/* Choice Buttons */
.rps-choices {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.rps-choice-btn {
    width: 90px;
    height: 90px;
    font-size: 40px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.rps-choice-btn span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.rps-choice-btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.05);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rps-choice-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}

.rps-choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rps-choice-btn.selected {
    background: linear-gradient(145deg, rgba(10, 132, 255, 0.3), rgba(10, 132, 255, 0.1));
    border: 2px solid rgba(10, 132, 255, 0.5);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.3);
    opacity: 1;
}

/* Score Display */
.rps-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.rps-score-item {
    text-align: center;
}

.rps-score-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rps-score-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rps-score-divider {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

/* Best of indicator */
.rps-best-of {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* Responsive RPS */
@media (max-width: 400px) {
    .rps-hand {
        width: 65px;
        height: 65px;
        font-size: 36px;
    }

    .rps-choice-btn {
        width: 75px;
        height: 75px;
        font-size: 32px;
    }

    .rps-choices {
        gap: 10px;
    }

    .rps-score-value {
        font-size: 28px;
    }
}