/* Minesweeper - Responsive Styles */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 15px;
}

h1 {
    font-size: clamp(14px, 4vw, 24px);
    margin-bottom: 15px;
    color: #ffdd00;
    text-shadow: 0 0 10px #ffdd00;
}

#mines-count {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

#board {
    border: 4px solid #ff6b00;
    background-color: #2a2a4a;
    display: flex;
    flex-wrap: wrap;
    box-shadow:
        0 0 30px rgba(255, 107, 0, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

#board div {
    background-color: #4a4a6a;
    border: 1px solid #5a5a7a;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.1s;
    font-weight: bold;
}

#board div:active {
    background-color: #3a3a5a;
}

.tile-clicked {
    background-color: #2a2a4a !important;
}

/* Number colors */
.x1 { color: #00bfff; text-shadow: 0 0 5px #00bfff; }
.x2 { color: #00ff00; text-shadow: 0 0 5px #00ff00; }
.x3 { color: #ff3333; text-shadow: 0 0 5px #ff3333; }
.x4 { color: #0000ff; text-shadow: 0 0 5px #0000ff; }
.x5 { color: #8b0000; text-shadow: 0 0 5px #8b0000; }
.x6 { color: #00ffff; text-shadow: 0 0 5px #00ffff; }
.x7 { color: #000000; }
.x8 { color: #808080; }

#controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#flag-button, #restart-button {
    padding: 12px 20px;
    font-size: clamp(16px, 4vw, 24px);
    background: linear-gradient(135deg, #ff6b00, #ffdd00);
    border: 3px solid #fff;
    border-radius: 10px;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s;
}

#flag-button:active, #restart-button:active {
    transform: scale(0.95);
}

#flag-button.active {
    background: linear-gradient(135deg, #ff3333, #ff6b00);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.5);
}

#restart-button {
    background: linear-gradient(135deg, #39ff14, #00fff7);
}

#game-status {
    margin-top: 10px;
    font-size: clamp(12px, 3vw, 18px);
    min-height: 25px;
}

#game-status.win {
    color: #39ff14;
    text-shadow: 0 0 10px #39ff14;
}

#game-status.lose {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

/* Touch hint */
.touch-hint {
    margin-top: 10px;
    font-size: clamp(10px, 2.5vw, 14px);
    color: #aaa;
}
