* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 20px;
}

.game-container {
    background: #0f3460;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.7);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a2e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.counter {
    background: #000;
    color: #ff5252;
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    padding: 5px 15px;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
}

.reset-btn {
    background: #e94560;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.difficulty {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.difficulty-btn {
    background: #1a1a2e;
    color: #fff;
    border: 2px solid #e94560;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-btn.active, .difficulty-btn:hover {
    background: #e94560;
}

/* Board scroll container */
.board-scroll-container {
    overflow-x: auto;
    background: #1f4068;
    border-radius: 5px;
    margin-bottom: 20px;
    padding: 5px;
    display: inline-block;
    max-width: 100%;
}

.board {
    display: grid;
    gap: 2px;
    margin: 0 auto;
    padding: 5px;
}

.cell {
    width: 30px;
    height: 30px;
    background: #1e3163;
    border: 2px solid #4e89ae;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cell:hover {
    background: #2d46a1;
}

.cell.revealed {
    background: #1a3a5f;
    border-color: #1a3a5f;
}

.cell.flagged::before {
    content: "🚩";
}

.cell.mine::after {
    content: "💣";
}

.cell.mine.revealed {
    background: #ff5252;
}

.cell-1 { color: #1976d2; }
.cell-2 { color: #388e3c; }
.cell-3 { color: #d32f2f; }
.cell-4 { color: #7b1fa2; }
.cell-5 { color: #ff8f00; }
.cell-6 { color: #0097a7; }
.cell-7 { color: #5d4037; }
.cell-8 { color: #455a64; }

.instructions {
    background: #1a1a2e;
    color: #c0c0c0;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instructions h3 {
    color: #e94560;
    margin-bottom: 10px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

.game-status {
    text-align: center;
    margin-top: 15px;
    height: 25px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #e94560;
}

/* Additional content styles */
.additional-content {
    background: #1a1a2e;
    color: #c0c0c0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.additional-content h2 {
    color: #e94560;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.additional-content h3 {
    color: #4e89ae;
    font-size: 1.2rem;
    margin: 20px 0 10px;
    border-bottom: 1px solid #4e89ae;
    padding-bottom: 5px;
}

.additional-content p {
    margin-bottom: 15px;
}

.additional-content ul {
    padding-left: 25px;
    margin-bottom: 15px;
}

.additional-content li {
    margin-bottom: 8px;
}

.table-container {
    overflow-x: auto;
    margin: 15px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #0f3460;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

thead {
    background: #e94560;
    color: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #4e89ae;
}

tbody tr:nth-child(even) {
    background: rgba(31, 64, 104, 0.5);
}

tbody tr:hover {
    background: rgba(78, 137, 174, 0.3);
}

ul.features {
    list-style-type: none;
    padding-left: 0;
}

ul.features li {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="green" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat left center;
    padding-left: 30px;
    margin-bottom: 10px;
    background-size: 20px;
}

.cta {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #4ade80;
    margin-top: 20px;
    padding: 10px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .game-container {
        max-height: 95vh;
        padding: 15px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .counter {
        font-size: 1.4rem;
        min-width: 60px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .additional-content {
        padding: 15px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 500px) {
    .cell {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .difficulty-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .counter {
        font-size: 1.2rem;
        min-width: 50px;
        padding: 5px 10px;
    }
    
    .reset-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .additional-content h2 {
        font-size: 1.3rem;
    }
}