/* Game Page Styles */

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: auto;
    max-width: 100vw;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100vw;
    min-height: 100vh;
    scroll-behavior: auto;
    overflow-anchor: none;
}

* {
    box-sizing: border-box;
}

body {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    scroll-behavior: auto;
    overflow-anchor: none;
}

#gameScreen {
    min-height: 100vh;
    height: auto;
    background: #0f1524 !important;
    background-color: #0f1524 !important;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
    padding-top: 0 !important;
    margin-top: 0 !important;
    scroll-behavior: auto;
    overflow-anchor: none;
}

.game-layout {
    display: flex !important;
    flex: 1;
    width: 100%;
    background: #090d1d !important;
    background-color: #090d1d !important;
    position: relative;
    z-index: 6;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden;
}

/* Game Controls Sidebar */
.game-controls {
    width: 320px;
    background: #0d1127;
    border-right: 1px solid #0c0e1d;
    padding: 20px;
    overflow-y: auto;
}

/* Bet Input Fixes */
.bet-input-container {
    position: relative;
    background: #0f2e16;
    border: 1px solid #1a2c38;
    border-radius: 6px;
    display: flex;
    align-items: center;
    height: 40px;
}

.bet-currency-icon {
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.bet-currency-icon .currency-icon {
    margin-right: 0;
}

.bet-amount-input {
    flex: 1;
    padding: 0 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
}

.bet-amount-input:focus {
    outline: none;
}

.bet-amount-display {
    padding: 4px 8px;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    background: #fbbf24;
    border-radius: 4px;
    margin-right: 8px;
    white-space: nowrap;
}

.control-group {
    margin-bottom: 20px;
}

.control-label {
    display: block;
    color: #b1bad3;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.control-input {
    width: 100%;
    background: #0f2e16;
    border: 1px solid #1a2c38;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-size: 14px;
}

.control-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-input:focus {
    outline: none;
    border-color: #00e701;
}

.balance-display {
    background: #0f2e16;
    border: 1px solid #1a2c38;
    border-radius: 6px;
    padding: 10px;
    color: #00e701;
    font-size: 16px;
    font-weight: 600;
}

.stat-value {
    background: #0f2e16;
    border: 1px solid #1a2c38;
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-size: 14px;
}

.game-action-btn {
    width: 100%;
    background: #4a7dff !important;
    background-color: #4a7dff !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.game-action-btn:hover {
    background: #3a6def !important;
    background-color: #3a6def !important;
    transform: translateY(-1px);
}

.game-action-btn:disabled {
    background: #2a3544;
    color: #6b7a8f;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.mode-toggle {
    display: flex;
    background: #181e3d !important;
    background-color: #181e3d !important;
    border: none;
    border-radius: 32px;
    padding: 4px;
}

#gameScreen .mode-toggle,
#gameScreen .game-controls .mode-toggle,
#gameScreen .control-group .mode-toggle {
    background: #181e3d !important;
    background-color: #181e3d !important;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: #8b96a5;
    cursor: pointer;
    border-radius: 28px;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
}

.mode-btn.active {
    background: #343c60;
    color: #fff;
    border: none;
    border-radius: 28px;
}

#gameScreen .mode-btn.active {
    background: #343c60 !important;
    background-color: #343c60 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 28px !important;
}

/* Game Main Area */
.game-main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #090d1d !important;
    background-color: #090d1d !important;
}

.game-content {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #090d1d !important;
    background-color: #090d1d !important;
    padding: 10px 20px;
    width: 100%;
    flex: 1;
    position: relative;
    z-index: 5;
    visibility: visible !important;
    opacity: 1 !important;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Game Window Container */
.game-window {
    background: #12131a !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 1400px !important;
    display: flex !important;
    min-height: 400px !important;
    max-height: calc(100vh - 100px) !important;
    height: auto;
    flex-direction: row;
    overflow: hidden;
    margin: 10px auto 100px auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    position: relative !important;
    z-index: 10 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure game window border radius is not overridden */
#gameScreen .game-window,
.game-layout .game-window,
.game-content .game-window {
    border-radius: 12px !important;
}

/* When no right sidebar, round the right side and center */
.game-window.no-right-sidebar {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 1100px !important;
}

.game-window.no-right-sidebar .game-window-sidebar-left {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
}

.game-window.no-right-sidebar .game-window-main,
#gameScreen .game-window.no-right-sidebar .game-window-main,
.game-layout .game-window.no-right-sidebar .game-window-main,
.game-content .game-window.no-right-sidebar .game-window-main,
.game-window.no-right-sidebar > .game-window-main,
#gameScreen .game-window.no-right-sidebar > .game-window-main,
.game-layout .game-window.no-right-sidebar > .game-window-main,
.game-content .game-window.no-right-sidebar > .game-window-main,
.game-window.no-right-sidebar div[data-fixed-width="950"],
#gameScreen .game-window.no-right-sidebar div[data-fixed-width="950"],
.game-layout .game-window.no-right-sidebar div[data-fixed-width="950"],
.game-content .game-window.no-right-sidebar div[data-fixed-width="950"] {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
}

/* Chat Sidebar in Game Window - Right Side */
.game-window-chat {
    width: 280px;
    flex-shrink: 0;
    background: #0d1127 !important;
    border-left: 1px solid #060712;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 16px 12px;
}

.game-window-chat > * {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

.game-window-chat .game-chat-container {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Main Game Area in Window */
.game-window-main,
#gameScreen .game-window-main,
.game-layout .game-window-main,
.game-content .game-window-main,
.game-window .game-window-main,
div.game-window-main,
.game-window > .game-window-main,
#gameScreen .game-window > .game-window-main,
.game-layout .game-window > .game-window-main,
.game-content .game-window > .game-window-main,
div[data-fixed-width="880"],
.game-window div[data-fixed-width="880"],
#gameScreen div[data-fixed-width="880"] {
    flex: 1 1 0 !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: min(30px, 2vh) min(15px, 1.5vw) !important;
    gap: min(15px, 1.5vh) !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: #0c0e1d !important;
    background-color: #0c0e1d !important;
    overflow: hidden !important;
}

/* Left Sidebar in Game Window - Controls */
.game-window-sidebar-left {
    width: 280px;
    flex-shrink: 0;
    background: #0d1127;
    border-right: 1px solid #060712;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    max-height: 100%;
    padding: 16px 12px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    box-sizing: border-box;
}

.game-window-sidebar-left .game-controls {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-right: none !important;
    padding: 0 !important;
    overflow-y: visible !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-top: 0 !important;
    justify-content: flex-start !important;
}

.game-window-sidebar-left .control-label,
.game-window-sidebar-left .game-controls .control-label {
    color: #b1bad3 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.game-window-sidebar-left .game-action-btn {
    background: #1576e2 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-top: auto !important;
    text-transform: none !important;
}

.game-window-sidebar-left .game-action-btn:hover {
    background: #0d5bb8 !important;
}

.game-window-sidebar-left .game-action-btn:disabled {
    background: #181e3d !important;
    color: #556b7a !important;
    cursor: not-allowed;
    opacity: 0.6 !important;
}

.game-window-sidebar-left .game-action-btn.cancel-search-btn {
    background: #ff4444 !important;
    background-color: #ff4444 !important;
    color: #fff !important;
}

.game-window-sidebar-left .game-action-btn.cancel-search-btn:hover {
    background: #ff4444 !important;
    background-color: #ff4444 !important;
}

/* Override all mode-toggle styles for left sidebar */
.game-window-sidebar-left .mode-toggle,
.game-window-sidebar-left .game-controls .mode-toggle,
.game-window-sidebar-left .control-group .mode-toggle,
#gameScreen .game-window-sidebar-left .mode-toggle,
#gameScreen .game-window-sidebar-left .game-controls .mode-toggle,
#gameScreen .game-window-sidebar-left .control-group .mode-toggle {
    display: flex !important;
    background: #181e3d !important;
    background-color: #181e3d !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 5px !important;
    gap: 0 !important;
    min-height: auto !important;
}

/* Override all mode-btn styles for left sidebar - inactive state */
.game-window-sidebar-left .mode-btn,
.game-window-sidebar-left .game-controls .mode-btn,
.game-window-sidebar-left .control-group .mode-btn,
#gameScreen .game-window-sidebar-left .mode-btn,
#gameScreen .game-window-sidebar-left .game-controls .mode-btn,
#gameScreen .game-window-sidebar-left .control-group .mode-btn,
.game-window-sidebar-left .mode-btn:hover,
.game-window-sidebar-left .mode-btn:focus,
#gameScreen .game-window-sidebar-left .mode-btn:hover,
#gameScreen .game-window-sidebar-left .mode-btn:focus {
    flex: 1 !important;
    color: #b1bad3 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 100px !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    min-height: 40px !important;
}

/* Override all mode-btn active styles for left sidebar */
.game-window-sidebar-left .mode-btn.active,
.game-window-sidebar-left .game-controls .mode-btn.active,
.game-window-sidebar-left .control-group .mode-btn.active,
#gameScreen .game-window-sidebar-left .mode-btn.active,
#gameScreen .game-window-sidebar-left .game-controls .mode-btn.active,
#gameScreen .game-window-sidebar-left .control-group .mode-btn.active,
.game-window-sidebar-left .mode-btn.active:hover,
.game-window-sidebar-left .mode-btn.active:focus,
#gameScreen .game-window-sidebar-left .mode-btn.active:hover,
#gameScreen .game-window-sidebar-left .mode-btn.active:focus {
    background: #343c60 !important;
    background-color: #343c60 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 100px !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 10px 18px !important;
    font-weight: 700 !important;
}

.game-window-sidebar-left .stat-value {
    background: #181e3d !important;
    border: none !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
}


.game-window-sidebar-left .control-input {
    background: #181e3d !important;
    border: none !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
}

.game-window-sidebar-left .control-group {
    margin-bottom: 8px;
    border: none !important;
    box-shadow: none !important;
}

.game-window-sidebar-left .control-group:first-child {
    margin-top: 0 !important;
}

.game-window-sidebar-left .control-group:last-child {
    margin-bottom: 0;
}

.game-window-sidebar-left .place-mines-label,
.game-window-sidebar-left .control-group .place-mines-label,
#gameScreen .game-window-sidebar-left .place-mines-label,
#gameScreen .game-window-sidebar-left .control-group .place-mines-label,
.game-window-sidebar-left .game-controls .place-mines-label,
#gameScreen .game-window-sidebar-left .game-controls .place-mines-label,
.game-window .game-window-sidebar-left .place-mines-label,
.game-sidebar-left .place-mines-label,
.game-sidebar-left .control-group .place-mines-label,
#gameScreen .game-sidebar-left .place-mines-label,
#gameScreen .game-sidebar-left .control-group .place-mines-label,
.game-sidebar-left .game-controls .place-mines-label,
#gameScreen .game-sidebar-left .game-controls .place-mines-label,
div.place-mines-label {
    background: #00e701 !important;
    background-color: #00e701 !important;
    color: #000000 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    font-size: 14px !important;
}


/* Place Mines Indicator Styling */
.game-window-sidebar-left .control-group:has(> div[style*="background: #8bc35d"]) > div,
.game-window-sidebar-left .control-group > div[style*="background: #8bc35d"],
.game-window-sidebar-left .control-group > div[style*="background-color: #8bc35d"],
.game-window-sidebar-left .control-group:has(> div[style*="background: #00e803"]) > div,
.game-window-sidebar-left .control-group > div[style*="background: #00e803"],
.game-window-sidebar-left .control-group > div[style*="background-color: #00e803"],
.game-window-sidebar-left .control-group:has(> div[style*="background: #00e701"]) > div,
.game-window-sidebar-left .control-group > div[style*="background: #00e701"],
.game-window-sidebar-left .control-group > div[style*="background-color: #00e701"] {
    background: #00e701 !important;
    background-color: #00e701 !important;
    color: #000000 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    display: block !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    cursor: default !important;
    position: relative !important;
    z-index: 1000 !important;
}

.game-window-sidebar-left .stat-item {
    border: none !important;
    box-shadow: none !important;
    background: #181e3d !important;
    margin-bottom: 6px !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    min-height: 40px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

.game-window-sidebar-left .stat-item .control-label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    color: #b1bad3 !important;
    font-weight: 700 !important;
}

.game-window-sidebar-left .stat-item:last-child {
    margin-bottom: 0 !important;
}

/* Clocks */
.clocks-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    min-height: 50px;
}

.clock-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clock {
    background: #1a2c38;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 18px;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid #1a2c38;
}

.clock-placement {
    background: #22384a;
    color: #fff;
    border-color: #00e701;
}

.clock-player {
    background: #1a2c38;
}

.clock-player.active {
    background: #00e701;
    color: #0f2e16;
    border-color: #00e701;
}

.game-status-container {
    margin-bottom: 30px;
}

.game-status {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.game-board-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 60vh;
    width: 100%;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: min(12px, 1vh);
    width: 100%;
    height: auto;
    max-width: min(550px, 100%, 60vh);
    max-height: min(550px, 60vh);
    margin-top: 0;
    aspect-ratio: 1 / 1;
}

/* Game Tiles */
.game-tile {
    background: #1a2743 !important;
    background-color: #1a2743 !important;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 0 0 #1d1d1b, 0 6px 8px rgba(0, 0, 0, 0.3);
}

.game-tile:hover {
    background-color: #3e4f63 !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 0 #1d1d1b, 0 8px 12px rgba(0, 0, 0, 0.35);
}

.game-tile.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.game-tile.own-mine {
    background-image: url('../bomb2.png') !important;
    background-size: 70% 70% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0.6;
}

.game-tile.own-mine:hover {
    background-image: url('../bomb2.png') !important;
}

.game-tile.revealed {
    background-color: #1e3a1e;
    cursor: default;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateY(2px);
}

.game-tile.revealed:hover {
    transform: translateY(2px);
}

.game-tile.safe {
    background-image: url('../dia.png') !important;
    background-size: 70% 70% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #1e3a1e;
}

.game-tile.safe:hover {
    background-image: url('../dia.png') !important;
}

.game-tile.opponent-mine {
    background-image: url('../bomb2.png') !important;
    background-size: 70% 70% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #1e3a1e;
    opacity: 0.8;
}

/* Pending click state - neutral loading effect */
.game-tile.pending-click {
    background-color: #2a3a50 !important;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1),
                0 0 15px rgba(100, 150, 255, 0.3) !important;
    animation: pendingPulse 0.8s ease-in-out infinite;
    cursor: wait !important;
}

@keyframes pendingPulse {
    0%, 100% { 
        opacity: 0.8;
        box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.1),
                    0 0 15px rgba(100, 150, 255, 0.3);
    }
    50% { 
        opacity: 1;
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2),
                    0 0 20px rgba(100, 150, 255, 0.5);
    }
}

/* Clicked mine - red effect with bomb */
.game-tile.clicked-mine {
    background-image: url('../bomb2.png') !important;
    background-size: 70% 70% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #ff1744 !important;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.8), 
                inset 0 0 15px rgba(255, 23, 68, 0.5),
                0 0 40px rgba(255, 23, 68, 0.4) !important;
    animation: explode 0.3s ease-out, redPulse 1s ease-in-out infinite;
    border: 2px solid rgba(255, 23, 68, 0.8) !important;
}

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

@keyframes redPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 23, 68, 0.8), 
                    inset 0 0 15px rgba(255, 23, 68, 0.5),
                    0 0 40px rgba(255, 23, 68, 0.4);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 23, 68, 1), 
                    inset 0 0 20px rgba(255, 23, 68, 0.7),
                    0 0 60px rgba(255, 23, 68, 0.6);
    }
}

/* Game Instructions */
#gameInstructions {
    text-align: center;
    margin-top: 24px;
    color: #b1bad3;
}

#gameInstructions h3 {
    color: #fff;
    font-size: 20px;
    margin: 0 0 8px 0;
}

#gameInstructions p {
    color: #b1bad3;
    font-size: 14px;
    margin: 0;
}

/* Game Result */
.game-result {
    margin-top: 40px;
    text-align: center;
    background: #1a2c38;
    border: 1px solid #1a2c38;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
}

.game-result h2 {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 32px;
}

.game-result p {
    margin: 0 0 24px 0;
    color: #b1bad3;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .game-layout {
        flex-direction: column;
    }

    .game-controls {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #1a3820;
    }

    .game-board {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .game-board {
        width: 300px;
        height: 300px;
    }

    .game-status {
        font-size: 18px;
    }
}

/* Game Chat Layout */
.game-layout-with-chat {
    display: flex !important;
    min-height: calc(100vh - 80px);
    flex: 0 0 auto;
    width: 100% !important;
    background: #090d1d !important;
    background-color: #090d1d !important;
    position: relative;
    z-index: 5;
    flex-direction: row !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Single Left Sidebar - Conditional Content */
.game-sidebar-left {
    display: none !important;
}

/* When chat is in the sidebar */
.game-sidebar-left .game-chat-panel {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    background: #0d1127;
    border: none;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* When controls are in the sidebar */
.game-sidebar-left .game-controls {
    width: 100%;
    background: transparent;
    border: none;
    height: 100%;
}

/* Simplified game controls during active game */
.game-controls.simplified {
    padding: 80px 20px 15px 20px;
    border-bottom: 1px solid #0f2e16;
    height: auto;
    flex-shrink: 0;
    background: #1a3820;
}

.game-controls.simplified .control-group {
    margin-bottom: 12px;
}

.game-controls.simplified .control-group:last-child {
    margin-bottom: 0;
}

.game-controls.simplified .game-action-btn {
    margin-top: 8px;
}

/* Recent Games Section */
.recent-games-section {
    background: #090d1d !important;
    background-color: #090d1d !important;
    padding-bottom: 40px !important;
}

/* Responsive sidebar */
@media (max-width: 1400px) {
    .game-window-sidebar-left,
    .game-window-chat {
        width: 240px !important;
        padding: 12px 8px !important;
    }

    .game-board {
        gap: 10px;
    }

    .game-window-main {
        padding: 20px 15px !important;
        gap: 15px !important;
    }

    .game-window-sidebar-left .control-label,
    .game-window-sidebar-left .game-controls .control-label {
        font-size: 12px !important;
    }

    .game-window-sidebar-left .mode-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 1200px) {
    .game-layout-with-chat {
        flex-direction: column;
    }

    .game-sidebar-left {
        width: 100%;
        max-width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #1a3820;
    }

    .game-window {
        max-width: 100%;
        width: 95vw !important;
        flex-direction: column;
        min-height: auto;
        margin: 20px auto 60px auto !important;
    }

    .game-window-sidebar-left,
    .game-window-chat {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: auto;
        min-height: 250px;
        border-radius: 0 !important;
        padding: 16px !important;
    }

    .game-window-sidebar-left {
        border-top-left-radius: 4px !important;
        border-top-right-radius: 4px !important;
        border-right: none;
        border-bottom: 1px solid #1a1a1a;
    }

    .game-window-chat {
        border-bottom-left-radius: 4px !important;
        border-bottom-right-radius: 4px !important;
        border-left: none;
        border-top: 1px solid #1a1a1a;
    }

    .game-board {
        width: min(450px, 85vw);
        height: min(450px, 85vw);
        gap: 8px;
    }

    .game-window-main {
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .game-window {
        width: 98vw !important;
        max-width: 98vw !important;
        margin: 10px auto 40px auto !important;
        border-radius: 4px !important;
    }

    .game-window-sidebar-left {
        padding: 12px 10px !important;
        min-height: 200px;
    }

    .game-board {
        width: min(400px, 90vw);
        height: min(400px, 90vw);
        gap: 6px;
    }

    .game-window-main {
        padding: 15px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 15px !important;
    }

    .pvp-status-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .player-card {
        width: 100%;
    }

    .round-timer {
        position: static;
        margin: 10px 0;
    }

    .game-window-sidebar-left .game-action-btn {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }

    .clocks-row {
        gap: 15px;
        margin-bottom: 15px;
    }

    .clock {
        font-size: 16px;
        padding: 6px 12px;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .game-board {
        width: min(320px, 95vw);
        height: min(320px, 95vw);
        gap: 4px;
    }

    .game-tile {
        border-radius: 4px;
    }

    .control-group {
        margin-bottom: 10px;
    }

    .mode-btn {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .game-window-main {
        padding: 10px 5px !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .game-window-sidebar-left .game-action-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .clocks-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .clock {
        font-size: 14px;
        padding: 5px 10px;
        min-width: 80px;
    }

    .game-status {
        font-size: 16px;
    }

    .game-window {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 5px auto 20px auto !important;
        border-radius: 0 !important;
    }
}
