body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px 20px 5px 20px;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
}

.left-column {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 0;
    margin-bottom: 0;
}

.right-column {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.right-controls {
    display: flex;
    align-items: center;
}

#score {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#restart {
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#restart:hover {
    background: #45a049;
}

.difficulty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.difficulty-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.difficulty-btn:hover {
    background: #e0e0e0;
}

.difficulty-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#board {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    display: grid;
    gap: 1px;
    background: #ccc;
    padding: 1px;
    border-radius: 4px;
    margin: 0 auto;
    margin-bottom: 5px;
}

.cell {
    width: 40px;
    height: 40px;
    background: #eee;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cell:hover {
    background: #ddd;
}

.cell.revealed {
    background: #fff;
}

.cell.mine {
    background: #ff4444;
}

.cell.flagged {
    background: #ffeb3b;
}

#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 5px;
    font-size: 24px;
    display: none;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
} 