/* ==========================================================================
   Cat Go Fish - Design System & Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0714;
    --bg-secondary: #130f24;
    --bg-glass: rgba(22, 17, 40, 0.7);
    --border-glass: rgba(255, 42, 133, 0.15);
    --color-pink: #ff2a85;
    --color-pink-glow: rgba(255, 42, 133, 0.4);
    --color-player: #00f0ff;
    --color-player-glow: rgba(0, 240, 255, 0.4);
    --color-ada: #e2e8f0;
    --color-ada-glow: rgba(226, 232, 240, 0.4);
    --color-euclid: #ffb830;
    --color-euclid-glow: rgba(255, 184, 48, 0.4);
    --color-red-suit: #ff2a5f;
    --color-black-suit: #1a1b20;
    --text-primary: #ffffff;
    --text-muted: #8b85a3;
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 42, 133, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 240, 255, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-pink);
    box-shadow: 0 0 10px var(--color-pink-glow);
    object-fit: cover;
}

.logo-section h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, var(--color-pink), var(--color-player));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-section span {
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 10px;
}

.header-controls {
    display: flex;
    gap: 12px;
}

button {
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 10px 20px;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-pink), #ff509e);
    color: white;
    box-shadow: 0 4px 15px var(--color-pink-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 42, 133, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary.easy-mode-active {
    border-color: rgba(46, 213, 115, 0.3);
    color: #2ed573;
}

.btn-secondary.hard-mode-active {
    border-color: rgba(255, 42, 133, 0.3);
    color: var(--color-pink);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Main Game Area
   ========================================================================== */
main {
    flex: 1;
    display: grid;
    grid-template-rows: auto auto;
    padding: 20px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.board-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    min-height: 0;
}

.table-area {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(12px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    height: 350px;
}

/* AI Players display at the top of the table */
.opponents-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.player-card-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 30%;
    max-width: 250px;
}

.avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 4px;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Active turn indicator glow */
.player-card-ui.active-turn .avatar-wrapper {
    animation: turn-glow 2s infinite ease-in-out;
}

.player-card-ui.ada.active-turn .avatar-wrapper {
    background: linear-gradient(135deg, #ffffff, var(--color-ada));
    box-shadow: 0 0 20px var(--color-ada-glow);
}

.player-card-ui.euclid.active-turn .avatar-wrapper {
    background: linear-gradient(135deg, #ffe066, var(--color-euclid));
    box-shadow: 0 0 20px var(--color-euclid-glow);
}

.human.active-turn .avatar-wrapper {
    background: linear-gradient(135deg, #00f0ff, #0080ff);
    box-shadow: 0 0 20px var(--color-player-glow);
}

@keyframes turn-glow {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.2); }
}

.player-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #18142a;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-card-ui.ada .player-badge { color: var(--color-ada); border-color: rgba(226, 232, 240, 0.3); }
.player-card-ui.euclid .player-badge { color: var(--color-euclid); border-color: rgba(255, 184, 48, 0.3); }
.human .player-badge { color: var(--color-player); border-color: rgba(0, 240, 255, 0.3); }

.player-stats {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Speech Bubbles
   ========================================================================== */
.speech-bubble {
    position: absolute;
    top: 95px;
    background: rgba(30, 25, 55, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: #e3dff2;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.3;
    max-width: 250px;
    width: 220px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 5;
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-bubble.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent rgba(30, 25, 55, 0.95) transparent;
}

.player-card-ui.ada .speech-bubble { border-color: rgba(226, 232, 240, 0.2); }
.player-card-ui.euclid .speech-bubble { border-color: rgba(255, 184, 48, 0.2); }

/* Center Board (Ocean / Deck and Announcements) */
.center-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 35%;
    max-width: 300px;
}

.announcement-box {
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.announcement-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ff9ecc;
    text-shadow: 0 0 10px rgba(255, 42, 133, 0.2);
    animation: pulse 2s infinite ease-in-out;
}

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

.ocean-area {
    width: 100%;
    height: 140px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ocean-deck-stack {
    position: relative;
    width: 80px;
    height: 120px;
    cursor: pointer;
}

/* Simulated scattered cards in the ocean */
.ocean-card-bg {
    position: absolute;
    width: 72px;
    height: 108px;
    border-radius: 8px;
    background-image: url('/static/img/card_back.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.ocean-card-bg:nth-child(1) { transform: rotate(-8deg) translate(-5px, -3px); }
.ocean-card-bg:nth-child(2) { transform: rotate(4deg) translate(8px, 5px); }
.ocean-card-bg:nth-child(3) { transform: rotate(-2deg) translate(0px, 0px); z-index: 3; }

.ocean-deck-stack:hover .ocean-card-bg:nth-child(1) { transform: rotate(-15deg) translate(-15px, -5px); }
.ocean-deck-stack:hover .ocean-card-bg:nth-child(2) { transform: rotate(12deg) translate(18px, 8px); }
.ocean-deck-stack:hover .ocean-card-bg:nth-child(3) { transform: scale(1.05); }

.ocean-deck-stack.clickable:hover .ocean-card-bg {
    box-shadow: 0 0 15px var(--color-pink-glow);
    border-color: var(--color-pink);
}

.deck-counter {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==========================================================================
   Side Panel: Game Log
   ========================================================================== */
.side-panel {
    background: rgba(14, 10, 28, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: 350px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(12px);
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 42, 133, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-entry {
    font-size: 0.82rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.log-entry.human { border-left-color: var(--color-player); }
.log-entry.ada { border-left-color: var(--color-ada); }
.log-entry.euclid { border-left-color: var(--color-euclid); }
.log-entry.system { border-left-color: var(--color-pink); background: rgba(255, 42, 133, 0.05); }

.log-rank {
    color: var(--color-pink);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 42, 133, 0.3);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 42, 133, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink);
}

/* ==========================================================================
   Bottom Panel: Player Zone
   ========================================================================== */
.player-zone {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(12px);
}

.player-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.player-info-brief {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-player);
    object-fit: cover;
}

.player-meta-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-player);
}

.player-meta-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Interactive Ask Controls */
.ask-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.target-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.target-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.target-btn.selected {
    color: white;
}

.target-btn.ada.selected {
    background: rgba(226, 232, 240, 0.15);
    box-shadow: 0 0 8px rgba(226, 232, 240, 0.2);
    border: 1px solid var(--color-ada);
}

.target-btn.euclid.selected {
    background: rgba(255, 184, 48, 0.15);
    box-shadow: 0 0 8px rgba(255, 184, 48, 0.2);
    border: 1px solid var(--color-euclid);
}

.btn-ask {
    padding: 10px 25px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-ask.inactive {
    background: linear-gradient(135deg, #1b172a, #110e1e);
    color: #4a445d;
    border: 1px solid rgba(255, 255, 255, 0.02);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.8;
}

.btn-ask.incomplete {
    background: linear-gradient(135deg, #231c3a, #2f274c);
    color: #8b85a3;
    border: 1px solid rgba(0, 240, 255, 0.15);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-ask.ready {
    background: linear-gradient(135deg, var(--color-player), #00a0ff);
    color: #05040a;
    box-shadow: 0 4px 15px var(--color-player-glow);
}

.btn-ask.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.6);
}

.selection-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   Hand Cards Display
   ========================================================================== */
.player-hand-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 130px;
    padding: 10px 0;
}

.hand-cards {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

/* ==========================================================================
   Card Object Design
   ========================================================================== */
.card {
    width: 72px;
    height: 108px;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 10px 22px rgba(255, 42, 133, 0.25);
    z-index: 50;
}

.card.selected {
    transform: translateY(-22px) scale(1.05);
    box-shadow: 0 0 15px var(--color-player);
    border: 1px solid var(--color-player);
    z-index: 40;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

/* Card Back Design */
.card-back-style {
    background-image: url('/static/img/card_back.jpg');
    background-size: cover;
    background-position: center;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

/* Card Front Design */
.card-front-style {
    background-color: #ffffff;
    border: 1px solid #c9c3e2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
}

.card-suit-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    opacity: 0.9;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.card-center-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

.card-corner {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.0;
    z-index: 3;
    gap: 1px;
}

.card-corner.top-left {
    align-self: flex-start;
}

.card-corner.bottom-right {
    align-self: flex-end;
    transform: rotate(180deg);
}

.suit-red { color: var(--color-red-suit); }
.suit-black { color: var(--color-black-suit); }

/* Books display list */
.books-display {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 5px;
    min-height: 24px;
}

.book-token {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ada .book-token { background: rgba(226, 232, 240, 0.15); border-color: var(--color-ada); }
.euclid .book-token { background: rgba(255, 184, 48, 0.15); border-color: var(--color-euclid); }
.human .book-token { background: rgba(0, 240, 255, 0.15); border-color: var(--color-player); }

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 3, 10, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--color-pink);
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Rules Detail Modal styling */
.rules-list {
    text-align: left;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.rules-list li {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 10px;
    list-style-type: square;
    margin-left: 20px;
}

.rules-list strong {
    color: var(--text-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .board-container {
        grid-template-columns: 1fr;
    }
    
    .table-area {
        height: auto;
        min-height: unset;
    }

    .side-panel {
        height: 250px;
    }

    .opponents-row {
        gap: 10px;
    }

    .speech-bubble {
        width: 170px;
        max-width: 170px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .opponents-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    #player-card-ada {
        order: 1;
    }

    #player-card-euclid {
        order: 2;
    }

    .center-board {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .player-card-ui {
        width: 100%;
    }

    .speech-bubble {
        top: auto;
        bottom: 95px;
    }

    /* Make ocean area and deck stack smaller on mobile to prevent overflow */
    .ocean-area {
        height: 100px;
    }

    .ocean-deck-stack {
        width: 60px;
        height: 90px;
    }

    .ocean-card-bg {
        width: 54px;
        height: 81px;
    }

    .ocean-card-bg:nth-child(1) { transform: rotate(-8deg) translate(-3px, -2px); }
    .ocean-card-bg:nth-child(2) { transform: rotate(4deg) translate(6px, 3px); }
    .ocean-card-bg:nth-child(3) { transform: rotate(-2deg) translate(0px, 0px); z-index: 3; }

    .ocean-deck-stack:hover .ocean-card-bg:nth-child(1) { transform: rotate(-15deg) translate(-10px, -3px); }
    .ocean-deck-stack:hover .ocean-card-bg:nth-child(2) { transform: rotate(12deg) translate(12px, 5px); }
    .ocean-deck-stack:hover .ocean-card-bg:nth-child(3) { transform: scale(1.05); }

    .deck-counter {
        bottom: -22px;
        font-size: 0.75rem;
        padding: 1px 6px;
    }

    .player-controls-row {
        flex-direction: column;
        align-items: center;
    }

    .ask-controls {
        flex-direction: column;
        width: 100%;
    }

    .target-selector {
        width: 100%;
        justify-content: center;
    }

    .btn-ask {
        width: 100%;
    }
}

/* More Games Modal styling */
.more-modal-intro {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 20px;
}
.more-modal-body {
    text-align: left;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}
.games-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.games-list li {
    margin: 0;
}
.game-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
}
.game-link:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.05);
}
.game-favicon {
    width: 28px;
    height: 28px;
    margin-right: 14px;
    object-fit: contain;
    border-radius: 4px;
    background: transparent;
}


/* Sound / Mute Toggle Button */
.sound-toggle-btn, #sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .sound-toggle-btn, #sound-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.85rem;
  }
}

/* Clear visual distinction for Muted state */
.sound-toggle-btn.muted, #sound-btn.muted {
  opacity: 0.55 !important;
  background: rgba(20, 20, 25, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}
