/* Modern Neon Arcade - CSS Stylesheet */

:root {
    --bg-dark: #0a0b10;
    --panel-bg: rgba(18, 20, 32, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 242, 254, 0.5);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    
    /* Neon Colors */
    --neon-blue: #00f2fe;
    --neon-pink: #ff007f;
    --neon-cyan: #00f2fe;
    --neon-green: #39ff14;
    --neon-orange: #ff9900;
    --neon-purple: #bd00ff;
    --neon-yellow: #ffe600;
    --neon-red: #ff3333;
    
    --shadow-blue: 0 0 15px rgba(0, 242, 254, 0.4);
    --shadow-pink: 0 0 15px rgba(255, 0, 127, 0.4);
    --shadow-yellow: 0 0 15px rgba(255, 230, 0, 0.4);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: background 0.5s ease;
}

/* Background Glowing Orbs for Visual Depth */
.background-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    mix-blend-mode: screen;
}

.orb-1 {
    top: 15%;
    left: 15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
    animation: pulse 12s infinite alternate ease-in-out;
}

.orb-2 {
    bottom: 15%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--neon-pink) 0%, transparent 70%);
    animation: pulse 15s infinite alternate-reverse ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
    100% { transform: scale(1.2) translate(30px, -20px); opacity: 0.22; }
}

/* Game Outer Wrapper */
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 900px;
}

/* Logo Design */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
    background-color: #0c0d15;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.logo .accent {
    color: var(--neon-pink);
    text-shadow: 0 0 15px rgba(255, 0, 127, 0.8), 0 0 30px rgba(255, 0, 127, 0.4);
}

/* Glassmorphism card utility */
.glass-card {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 10px 40px rgba(0, 242, 254, 0.15);
}

/* LOBBY SCREEN LAYOUT */
.lobby-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

.lobby-screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 850px;
}

.game-card {
    padding: 1.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.30s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--neon-cyan);
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.25);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 8px currentColor);
}

.game-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.game-card p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Color definitions */
.text-cyan { color: var(--neon-cyan) !important; }
.text-green { color: var(--neon-green) !important; }
.text-red { color: var(--neon-red) !important; }
.text-yellow { color: var(--neon-yellow) !important; }
.text-pink { color: var(--neon-pink) !important; }
.text-purple { color: var(--neon-purple) !important; }
.text-orange { color: var(--neon-orange) !important; }
.text-white { color: #ffffff !important; }

/* Lobby settings area */
.lobby-settings {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    margin-top: 2rem;
    border-radius: 50px;
}

/* GAMEPLAY SCREEN LAYOUT */
.game-screen {
    display: none;
    flex-direction: column;
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

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

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Container Grid layout */
.game-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

/* Board Canvas Area */
.board-area {
    position: relative;
}

.canvas-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    background-color: rgba(5, 6, 12, 0.95);
}

canvas[id$="board"] {
    display: block;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Overlay Screen Styles (Start, Game Over, Pause) */
.overlay-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 10;
}

.overlay-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-content {
    text-align: center;
    padding: 1.5rem;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.glowing-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--neon-blue);
    text-shadow: var(--shadow-blue);
    margin-bottom: 0.8rem;
}

.error-glow {
    color: var(--neon-pink);
    text-shadow: var(--shadow-pink);
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    max-width: 240px;
    line-height: 1.5;
}

.score-summary {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
}

.score-summary span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.4);
    display: block;
    margin-top: 0.4rem;
}

/* Sleek Buttons */
.btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    outline: none;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
    background: linear-gradient(135deg, #33f5ff 0%, #70baff 100%);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

/* Side Panel styling */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 240px;
}

.panel-section {
    padding: 1.2rem;
}

.panel-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.4rem;
}

/* Next Canvas View */
.next-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.next-canvas-container {
    background-color: rgba(5, 6, 12, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    margin-top: 0.2rem;
}

#next {
    display: block;
}

/* Stats Boxes */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-cyan);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

/* Control Key List */
.controls-panel {
    display: flex;
    flex-direction: column;
}

.control-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.key-cap {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.long-cap {
    width: 58px;
    font-size: 0.65rem;
}

.control-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Audio / Settings Area */
.settings-area {
    margin-top: 1.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
}

.icon-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.icon-btn:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Mobile Controls Styling (Overlay at the bottom) */
.mobile-controls {
    display: none; /* Shown on screens under 640px */
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.mob-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mob-btn:active {
    background: rgba(0, 242, 254, 0.25);
    border-color: var(--neon-cyan);
}

.primary-mob {
    background: rgba(0, 242, 254, 0.1);
    border-color: rgba(0, 242, 254, 0.2);
    color: var(--neon-cyan);
}

/* Roulette Wheel Styling */
.roulette-glow {
    color: var(--neon-yellow) !important;
    text-shadow: 0 0 15px rgba(255, 230, 0, 0.8), 0 0 30px rgba(255, 230, 0, 0.4) !important;
}

.roulette-sub {
    margin-bottom: 1rem !important;
}

.wheel-wrapper {
    position: relative;
    width: 240px;
    height: 245px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-pointer {
    color: var(--neon-pink);
    font-size: 2.2rem;
    text-shadow: 0 0 15px rgba(255, 0, 127, 0.8);
    position: absolute;
    top: -14px;
    z-index: 5;
    line-height: 1;
    transform-origin: 50% 80%;
    transition: transform 0.1s ease;
}

.wheel-pointer.wiggle {
    animation: pointerWiggle 0.15s infinite alternate ease-in-out;
}

@keyframes pointerWiggle {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

#wheel-canvas {
    border-radius: 50%;
    border: 4px solid var(--neon-blue);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4), inset 0 0 25px rgba(0, 242, 254, 0.4);
    background-color: #0c0d15;
    transition: transform 3.5s cubic-bezier(0.12, 0.8, 0.15, 1);
    transform: rotate(0deg);
}

.roulette-result {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 800;
    min-height: 24px;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: center;
}

.result-glowing {
    animation: flash 0.4s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.4; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 12px currentColor, 0 0 25px currentColor; }
}

/* UI Stat Buff Indicators */
.full-width-stat {
    grid-column: span 2;
}

.text-disabled {
    color: rgba(255, 255, 255, 0.15) !important;
    text-shadow: none !important;
}

.text-active-shield {
    color: var(--neon-green) !important;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6) !important;
    animation: shield-pulse 1.5s infinite alternate ease-in-out;
}

@keyframes shield-pulse {
    0% { opacity: 0.75; }
    100% { opacity: 1; text-shadow: 0 0 15px rgba(57, 255, 20, 0.9); }
}

.alert-glow {
    color: var(--neon-orange) !important;
    text-shadow: 0 0 10px rgba(255, 153, 0, 0.6) !important;
    animation: alert-pulse 0.8s infinite alternate ease-in-out;
}

@keyframes alert-pulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; text-shadow: 0 0 15px rgba(255, 153, 0, 0.8); }
}

.hidden {
    display: none !important;
}

/* Manual Screen & Scrollbar Styles */
.manual-content {
    width: 90%;
    max-width: 290px;
    padding: 1.2rem 1rem !important;
}

.manual-scroll-area {
    max-height: 280px;
    overflow-y: auto;
    text-align: left;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    margin-top: 0.8rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.manual-scroll-area::-webkit-scrollbar {
    width: 4px;
}
.manual-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.manual-scroll-area::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 10px;
}

.manual-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--neon-yellow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.2rem;
    margin-bottom: 0.6rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px rgba(255, 230, 0, 0.4);
}

.manual-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.manual-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.4rem;
}

.manual-item i {
    margin-right: 6px;
    font-size: 0.85rem;
    display: inline-block;
    width: 16px;
    text-align: center;
}

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

.manual-item span {
    color: var(--text-muted);
    font-size: 0.65rem;
    padding-left: 22px;
}

/* Background Theme Variations */

/* Theme 1: Neon Nebula is the default body (uses .background-decorations) */
body.bg-theme-1 {
    background-color: var(--bg-dark);
}

/* Theme 2: Cyber Synthwave Grid */
body.bg-theme-2 {
    background: linear-gradient(to bottom, #12001e 0%, #04000b 100%);
    overflow: hidden;
}

body.bg-theme-2::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: -50%;
    background-image: 
        linear-gradient(to right, rgba(189, 0, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(189, 0, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(350px) rotateX(65deg) translateY(0);
    transform-origin: top center;
    animation: synthgrid 14s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes synthgrid {
    0% { transform: perspective(350px) rotateX(65deg) translateY(0); }
    100% { transform: perspective(350px) rotateX(65deg) translateY(50px); }
}

/* Theme 3: Cyber Matrix Rain */
body.bg-theme-3 {
    background: #020202;
}

body.bg-theme-3::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%),
        linear-gradient(90deg, rgba(57, 255, 20, 0.02), rgba(57, 255, 20, 0.005) 50%);
    background-size: 100% 4px, 6px 100%;
    z-index: -1;
    pointer-events: none;
}

body.bg-theme-3::after {
    content: '0110101001010100110010101010010101010010101010100110010101010010101010010101010100110010101010';
    color: rgba(57, 255, 20, 0.06);
    font-family: monospace;
    font-size: 11px;
    position: absolute;
    top: -200px;
    left: 4%;
    width: 92%;
    white-space: pre-wrap;
    word-break: break-all;
    animation: matrixrain 22s linear infinite;
    z-index: -2;
    pointer-events: none;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 6px;
    line-height: 4;
}

@keyframes matrixrain {
    0% { transform: translateY(-20%); }
    100% { transform: translateY(110%); }
}

/* Theme 4: Cosmic Vortex */
body.bg-theme-4 {
    background: radial-gradient(circle at center, #020516 0%, #000105 100%);
}

body.bg-theme-4::before {
    content: '';
    position: absolute;
    top: calc(50% - 250px);
    left: calc(50% - 250px);
    width: 500px;
    height: 500px;
    border: 2px dashed rgba(255, 0, 127, 0.05);
    border-radius: 50%;
    animation: spinvortex 36s linear infinite;
    z-index: -1;
    pointer-events: none;
}

body.bg-theme-4::after {
    content: '';
    position: absolute;
    top: calc(50% - 170px);
    left: calc(50% - 170px);
    width: 340px;
    height: 340px;
    border: 1px dotted rgba(0, 242, 254, 0.06);
    border-radius: 50%;
    animation: spinvortexreverse 28s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes spinvortex {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.08); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes spinvortexreverse {
    0% { transform: rotate(360deg) scale(1.08); }
    50% { transform: rotate(180deg) scale(0.96); }
    100% { transform: rotate(0deg) scale(1.08); }
}

/* Hide Nebula orbs on other themes */
body.bg-theme-2 .background-decorations,
body.bg-theme-3 .background-decorations,
body.bg-theme-4 .background-decorations {
    display: none;
}

/* Responsive Breakpoints */
@media (max-width: 640px) {
    .game-wrapper {
        padding: 0.8rem;
        gap: 0.6rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    /* Wrap lobby cards into 2 readable columns instead of 3 squished ones */
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .game-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .canvas-container {
        width: 270px;
        height: 540px;
    }

    canvas[id$="board"] {
        width: 100%;
        height: 100%;
    }

    .overlay-content {
        padding: 0.8rem;
        width: 100%;
    }

    .glowing-text {
        font-size: 1.25rem;
        letter-spacing: 0.06em;
    }

    .btn {
        padding: 0.55rem 1.1rem;
        font-size: 0.75rem;
    }

    .side-panel {
        width: 270px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .next-panel {
        width: 100px;
        padding: 0.6rem;
    }

    .next-canvas-container {
        width: 60px;
        height: 60px;
    }
    
    #next {
        width: 100%;
        height: 100%;
    }

    .stats-panel {
        width: 155px;
        padding: 0.6rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem 0.6rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .controls-panel {
        display: none; /* Hide on mobile to save screen estate */
    }

    /* Show Touch Controls - Gamepad D-pad & Action split layout */
    .mobile-controls {
        display: grid;
        grid-template-areas: 
            "left   rotate  right"
            "down   drop    skip";
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        width: 100%;
        max-width: 270px;
        margin-top: 0.8rem;
    }

    #mobile-left   { grid-area: left; }
    #mobile-rotate { grid-area: rotate; }
    #mobile-right  { grid-area: right; }
    #mobile-down   { grid-area: down; }
    #mobile-drop   { grid-area: drop; }
    #mobile-skip   { grid-area: skip; }

    .mob-btn {
        height: 46px; /* slightly sleeker height for dual-row */
        font-size: 1.1rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Touch responsiveness polish for interactive buttons */
.mob-btn, .game-card, .icon-btn, .btn, .size-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Minesweeper Sizing Panel Styling */
.game-specific-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.game-specific-options span {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.size-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.size-btn:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--neon-cyan);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.size-btn.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--neon-cyan);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    text-shadow: 0 0 5px #ffffff;
}

