/* ========================================
   CSS Variables - Dream Puff Theme
   ======================================== */
:root {
    /* Colors from Dream Puff */
    --primary-color: #D4A574;
    --secondary-color: #8B6F47;
    --accent-color: #F5E6D3;
    --bg-color: #FEFDFB;
    --text-dark: #2C2416;
    --text-light: #F5E6D3;

    /* Game-specific colors */
    --cell-hidden: #D4A574;
    --cell-revealed: #F5E6D3;
    --cell-hover: #E0B585;
    --mine-color: #8B4513;
    --flag-color: #C41E3A;
    --border-color: #8B6F47;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background:
        linear-gradient(135deg, rgba(245, 230, 211, 0.35) 0%, rgba(254, 253, 251, 0.80) 100%),
        url('../puff_lg5pq0lg5pq0lg5p.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Game Page Wrapper
   ======================================== */
.game-page-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 80px; /* Account for fixed navbar */
}

/* ========================================
   Game Container
   ======================================== */
.game-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 111, 71, 0.15);
    padding: 30px;
    max-width: 95vw;
    width: fit-content;
}

/* ========================================
   Header
   ======================================== */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.game-subtitle {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* ========================================
   Controls
   ======================================== */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: var(--secondary-color);
}

.difficulty-selector {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-selector:hover {
    border-color: var(--secondary-color);
    background: var(--accent-color);
}

.difficulty-selector:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.btn-primary {
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 111, 71, 0.4);
}

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

.counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--accent-color);
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.counter-icon {
    font-size: 1.2rem;
}

.counter-value {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

.wins-counter {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #DAA520;
}

.wins-counter .counter-value {
    color: #8B4513;
}

.timer-counter {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border-color: #2E5C8A;
}

.timer-counter .counter-value {
    color: #FFFFFF;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Game Board
   ======================================== */
.game-board {
    display: inline-grid;
    gap: 2px;
    background: var(--border-color);
    padding: 2px;
    border-radius: 10px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(139, 111, 71, 0.2);
}

.game-board.shake {
    animation: screenShake 1.2s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ========================================
   Cells
   ======================================== */
.cell {
    width: 35px;
    height: 35px;
    background: var(--cell-hidden);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: var(--cell-hover);
    transform: scale(1.05);
}

.cell.revealed {
    background: var(--cell-revealed);
    cursor: default;
    animation: cellReveal 0.3s ease;
}

.cell.flagged {
    background: var(--cell-hidden);
    cursor: pointer;
}

.cell.flagged::after {
    content: '🚩';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    animation: flagPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cell.mine {
    background: var(--mine-color);
}

.cell.mine::after {
    content: '💣';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
}

.cell.exploded {
    background: #C41E3A;
    animation: explosion 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: visible;
    z-index: 10;
}

/* White flash overlay */
.cell.exploded::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 200, 100, 0.9) 10%,
        rgba(255, 107, 107, 0.8) 30%,
        rgba(255, 50, 50, 0.4) 60%,
        rgba(196, 30, 58, 0) 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: megaShockwave 1.2s ease-out;
    pointer-events: none;
    z-index: 20;
}

.cell.exploded::after {
    content: '💥';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    animation: extremeExplosionShake 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1))
            drop-shadow(0 0 25px rgba(255, 107, 107, 1))
            drop-shadow(0 0 35px rgba(255, 50, 50, 0.8));
    z-index: 21;
}

/* Number colors based on count */
.cell[data-count="1"] { color: #0000FF; }
.cell[data-count="2"] { color: #008000; }
.cell[data-count="3"] { color: #FF0000; }
.cell[data-count="4"] { color: #000080; }
.cell[data-count="5"] { color: #800000; }
.cell[data-count="6"] { color: #008080; }
.cell[data-count="7"] { color: #000000; }
.cell[data-count="8"] { color: #808080; }

/* ========================================
   Game Message
   ======================================== */
.game-message {
    text-align: center;
    margin-top: 20px;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    animation: messageSlide 0.4s ease;
}

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

.game-message.win {
    background: #D4EDDA;
    color: #155724;
    border: 2px solid #C3E6CB;
}

.game-message.lose {
    background: #F8D7DA;
    color: #721C24;
    border: 2px solid #F5C6CB;
}

/* ========================================
   Player Greeting Section
   ======================================== */
.player-section {
    text-align: center;
    margin: 25px 0 20px 0;
}

.player-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#greeting-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.name-editor {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.name-editor.hidden {
    display: none;
}

#player-name-input {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    min-width: 200px;
    transition: all 0.3s ease;
}

#player-name-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.btn-secondary {
    padding: 10px 20px;
    background: white;
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-color);
    border-color: var(--secondary-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ========================================
   Game Back Link
   ======================================== */
.game-back-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--accent-color);
}

.game-back-link .back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.game-back-link .back-link:hover {
    color: var(--secondary-color);
}

/* ========================================
   Animations
   ======================================== */
@keyframes cellReveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flagPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes explosion {
    0% {
        transform: scale(1) rotate(0deg);
        background: #C41E3A;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    5% {
        transform: scale(2.5) rotate(10deg);
        background: #FFFFFF;
        box-shadow: 0 0 60px rgba(255, 255, 255, 1),
                    0 0 100px rgba(255, 200, 100, 0.8);
    }
    10% {
        transform: scale(0.5) rotate(-15deg);
        background: #FFD700;
        box-shadow: 0 0 80px rgba(255, 215, 0, 1);
    }
    20% {
        transform: scale(2.8) rotate(20deg);
        background: #FF4500;
        box-shadow: 0 0 100px rgba(255, 69, 0, 1),
                    0 0 120px rgba(255, 50, 50, 0.9);
    }
    30% {
        transform: scale(0.6) rotate(-25deg);
        background: #FF6B6B;
        box-shadow: 0 0 70px rgba(255, 107, 107, 1);
    }
    40% {
        transform: scale(2.5) rotate(30deg);
        background: #FF0000;
        box-shadow: 0 0 90px rgba(255, 0, 0, 1),
                    0 0 110px rgba(255, 23, 68, 1);
    }
    50% {
        transform: scale(0.7) rotate(-20deg);
        background: #FF1744;
        box-shadow: 0 0 85px rgba(255, 23, 68, 1);
    }
    60% {
        transform: scale(2.2) rotate(15deg);
        background: #FF5252;
        box-shadow: 0 0 75px rgba(255, 82, 82, 0.9);
    }
    70% {
        transform: scale(0.8) rotate(-10deg);
        background: #E53935;
        box-shadow: 0 0 60px rgba(229, 57, 53, 0.8);
    }
    80% {
        transform: scale(1.8) rotate(8deg);
        background: #D32F2F;
        box-shadow: 0 0 45px rgba(211, 47, 47, 0.7);
    }
    90% {
        transform: scale(0.9) rotate(-5deg);
        background: #C41E3A;
        box-shadow: 0 0 30px rgba(196, 30, 58, 0.6);
    }
    100% {
        transform: scale(1) rotate(0deg);
        background: #C41E3A;
        box-shadow: 0 0 15px rgba(196, 30, 58, 0.5);
    }
}

@keyframes extremeExplosionShake {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    3% {
        transform: translate(-80%, -30%) rotate(-45deg) scale(2.5);
    }
    6% {
        transform: translate(-20%, -70%) rotate(50deg) scale(2.8);
    }
    9% {
        transform: translate(-90%, -60%) rotate(-60deg) scale(2.2);
    }
    12% {
        transform: translate(-10%, -40%) rotate(70deg) scale(3.0);
    }
    15% {
        transform: translate(-75%, -85%) rotate(-55deg) scale(2.4);
    }
    18% {
        transform: translate(-25%, -15%) rotate(65deg) scale(2.9);
    }
    21% {
        transform: translate(-95%, -50%) rotate(-75deg) scale(2.1);
    }
    24% {
        transform: translate(-5%, -50%) rotate(80deg) scale(2.7);
    }
    27% {
        transform: translate(-70%, -70%) rotate(-50deg) scale(2.5);
    }
    30% {
        transform: translate(-30%, -30%) rotate(55deg) scale(2.6);
    }
    35% {
        transform: translate(-85%, -45%) rotate(-40deg) scale(2.3);
    }
    40% {
        transform: translate(-15%, -55%) rotate(45deg) scale(2.4);
    }
    45% {
        transform: translate(-65%, -65%) rotate(-35deg) scale(2.2);
    }
    50% {
        transform: translate(-50%, -50%) rotate(0deg) scale(3.2);
    }
    55% {
        transform: translate(-45%, -60%) rotate(-30deg) scale(2.0);
    }
    60% {
        transform: translate(-55%, -40%) rotate(35deg) scale(2.1);
    }
    65% {
        transform: translate(-40%, -65%) rotate(-25deg) scale(1.8);
    }
    70% {
        transform: translate(-60%, -35%) rotate(25deg) scale(1.9);
    }
    75% {
        transform: translate(-48%, -58%) rotate(-20deg) scale(1.6);
    }
    80% {
        transform: translate(-52%, -42%) rotate(20deg) scale(1.7);
    }
    85% {
        transform: translate(-47%, -55%) rotate(-15deg) scale(1.4);
    }
    90% {
        transform: translate(-53%, -45%) rotate(15deg) scale(1.5);
    }
    95% {
        transform: translate(-49%, -52%) rotate(-8deg) scale(1.2);
    }
    98% {
        transform: translate(-51%, -48%) rotate(5deg) scale(1.1);
    }
}

@keyframes megaShockwave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    5% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 1;
    }
    15% {
        transform: translate(-50%, -50%) scale(5);
        opacity: 0.9;
    }
    30% {
        transform: translate(-50%, -50%) scale(8);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(12);
        opacity: 0.5;
    }
    70% {
        transform: translate(-50%, -50%) scale(15);
        opacity: 0.3;
    }
    85% {
        transform: translate(-50%, -50%) scale(18);
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

@keyframes screenShake {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    2% {
        transform: translate(-15px, 10px) rotate(2deg);
    }
    4% {
        transform: translate(12px, -8px) rotate(-1.5deg);
    }
    6% {
        transform: translate(-18px, 15px) rotate(2.5deg);
    }
    8% {
        transform: translate(14px, -12px) rotate(-2deg);
    }
    10% {
        transform: translate(-20px, 8px) rotate(3deg);
    }
    12% {
        transform: translate(16px, -14px) rotate(-2.5deg);
    }
    14% {
        transform: translate(-12px, 18px) rotate(2deg);
    }
    16% {
        transform: translate(18px, -10px) rotate(-3deg);
    }
    18% {
        transform: translate(-14px, 12px) rotate(2.5deg);
    }
    20% {
        transform: translate(10px, -16px) rotate(-2deg);
    }
    25% {
        transform: translate(-10px, 8px) rotate(1.5deg);
    }
    30% {
        transform: translate(8px, -10px) rotate(-1.5deg);
    }
    35% {
        transform: translate(-12px, 6px) rotate(1deg);
    }
    40% {
        transform: translate(6px, -8px) rotate(-1deg);
    }
    45% {
        transform: translate(-8px, 10px) rotate(1.5deg);
    }
    50% {
        transform: translate(10px, -6px) rotate(-1deg);
    }
    55% {
        transform: translate(-6px, 8px) rotate(0.8deg);
    }
    60% {
        transform: translate(4px, -4px) rotate(-0.8deg);
    }
    65% {
        transform: translate(-4px, 6px) rotate(0.6deg);
    }
    70% {
        transform: translate(6px, -4px) rotate(-0.6deg);
    }
    75% {
        transform: translate(-3px, 2px) rotate(0.4deg);
    }
    80% {
        transform: translate(2px, -3px) rotate(-0.4deg);
    }
    85% {
        transform: translate(-2px, 2px) rotate(0.2deg);
    }
    90% {
        transform: translate(2px, -1px) rotate(-0.2deg);
    }
    95% {
        transform: translate(-1px, 1px) rotate(0.1deg);
    }
}

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

/* ========================================
   Win Celebration Animations
   ======================================== */

/* Confetti particles */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 1000;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Cell celebration wave */
.cell.celebrate {
    animation: cellCelebrate 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cellCelebrate {
    0% {
        background: var(--cell-revealed);
        transform: scale(1);
    }
    25% {
        background: #FFD700;
        transform: scale(1.2) rotate(5deg);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% {
        background: #FFA500;
        transform: scale(1.3) rotate(-5deg);
        box-shadow: 0 0 30px rgba(255, 165, 0, 0.9);
    }
    75% {
        background: #FFD700;
        transform: scale(1.2) rotate(3deg);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    100% {
        background: var(--cell-revealed);
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
}

/* Victory overlay */
.victory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: overlayFadeIn 0.5s ease;
    pointer-events: none;
}

.victory-content {
    text-align: center;
    animation: victoryBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.victory-trophy {
    font-size: 120px;
    animation: trophySpin 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.victory-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #FFD700;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4);
    margin-top: 20px;
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

.victory-subtext {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: white;
    margin-top: 10px;
    opacity: 0.9;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes victoryBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    75% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes trophySpin {
    0%, 100% {
        transform: rotateY(0deg) scale(1);
    }
    25% {
        transform: rotateY(180deg) scale(1.1);
    }
    50% {
        transform: rotateY(360deg) scale(1);
    }
    75% {
        transform: rotateY(540deg) scale(1.1);
    }
}

@keyframes textGlow {
    from {
        text-shadow:
            0 0 10px rgba(255, 215, 0, 0.8),
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 30px rgba(255, 215, 0, 0.4);
    }
    to {
        text-shadow:
            0 0 20px rgba(255, 215, 0, 1),
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            0 0 50px rgba(255, 215, 0, 0.4);
    }
}

/* Board sparkle effect */
.game-board.victory-glow {
    animation: boardGlow 2s ease-in-out infinite;
}

@keyframes boardGlow {
    0%, 100% {
        box-shadow:
            0 8px 24px rgba(139, 111, 71, 0.2),
            0 0 30px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow:
            0 8px 24px rgba(139, 111, 71, 0.2),
            0 0 60px rgba(255, 215, 0, 0.8),
            0 0 90px rgba(255, 215, 0, 0.5);
    }
}

/* Firework particles */
.firework {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: 1000;
    pointer-events: none;
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Mobile phones */
@media (max-width: 767px) {
    .game-container {
        padding: 20px 15px;
    }

    .game-title {
        font-size: 2rem;
    }

    .controls {
        gap: 15px;
    }

    .cell {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .cell.flagged::after,
    .cell.mine::after {
        font-size: 1rem;
    }

    .cell.exploded::after {
        font-size: 1.1rem;
    }

    .btn-primary {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .difficulty-selector {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Victory overlay mobile */
    .victory-trophy {
        font-size: 80px;
    }

    .victory-text {
        font-size: 2rem;
    }

    .victory-subtext {
        font-size: 1.2rem;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .cell {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
}

/* Large screens - Expert mode */
@media (min-width: 1024px) {
    .game-board.expert .cell {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .game-container {
        padding: 15px 10px;
    }

    .game-title {
        font-size: 1.5rem;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .cell {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .cell.flagged::after,
    .cell.mine::after {
        font-size: 0.85rem;
    }

    .game-board.expert .cell {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* Prevent text selection during gameplay */
.game-board,
.cell {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
