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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 1400px;
    width: 100%;
}

.game-title {
    font-size: 48px;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff4500, 0 0 40px #ff1493;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    border: 2px solid #ff1493;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 14px;
    color: #ff1493;
    font-weight: 600;
    text-shadow: 0 0 5px #ff1493;
}

.info-value {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px #ff4500;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #ff1493;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.4);
}

.difficulty-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.6);
    border-color: #ff4500;
}

.difficulty-btn.active {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
    border-color: white;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.8);
}

.game-board {
    display: inline-grid;
    gap: 1px;
    background: #ff4500;
    padding: 5px;
    border-radius: 10px;
    border: 3px solid #ff1493;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.cell {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    border: 2px outset #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
}

.cell:hover:not(.revealed):not(.flagged) {
    background: linear-gradient(135deg, #f0f0f0 0%, #d0d0d0 100%);
}

.cell.revealed {
    background: #fff;
    border: 1px solid #999;
    cursor: default;
}

.cell.flagged {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.cell.mine {
    background: #ef4444;
}

.cell.mine-hit {
    background: #dc2626;
    animation: explode 0.3s ease;
}

@keyframes explode {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cell.number-1 { color: #0000ff; }
.cell.number-2 { color: #008000; }
.cell.number-3 { color: #ff0000; }
.cell.number-4 { color: #000080; }
.cell.number-5 { color: #800000; }
.cell.number-6 { color: #008080; }
.cell.number-7 { color: #000000; }
.cell.number-8 { color: #808080; }

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn {
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #ff1493;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.6), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.4);
    border-color: #ff4500;
}

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

.btn:not(.btn-secondary) {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-color: white;
}

.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.instructions p {
    margin: 5px 0;
    color: #333;
    font-size: 14px;
}

.message {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    min-height: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    max-width: 400px;
}

.modal-content h2 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.final-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: #f3f4f6;
    border-radius: 10px;
}

.stat-label {
    font-size: 18px;
    color: #666;
    font-weight: 600;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 36px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .difficulty-btn {
        font-size: 12px;
        padding: 8px 15px;
    }
}

