/* Game-specific styles */
.game-container {
    min-height: 100vh;
    padding: 100px 20px 50px;
    background: var(--dark-bg);
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.difficulty-selector label {
    color: var(--text-light);
    font-weight: 500;
}

.difficulty-selector select {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: var(--darker-bg);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.difficulty-selector select:focus {
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.custom-settings {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-settings input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: var(--darker-bg);
    color: var(--text-light);
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.custom-settings input:focus {
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.stat-item span {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    overflow-x: auto;
}

.game-board {
    display: grid;
    gap: 2px;
    background: var(--darker-bg);
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.2);
}

.cell {
    width: 30px;
    height: 30px;
    background: #2a2a3e;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.cell:hover {
    background: #3a3a4e;
    transform: scale(1.05);
}

.cell.revealed {
    background: #1a1a2e;
    border: 1px solid #666;
    cursor: default;
}

.cell.revealed:hover {
    transform: none;
}

.cell.flagged {
    background: #4a1a2e;
    color: #ff6b35;
}

.cell.flagged::before {
    content: '🚩';
    font-size: 0.8rem;
}

.cell.mine {
    background: #ff1744;
    color: white;
}

.cell.mine::before {
    content: '💣';
    font-size: 0.8rem;
}

.cell.mine.exploded {
    background: #ff5722;
    animation: explode 0.5s ease-out;
}

@keyframes explode {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cell.number-1 { color: #2196f3; }
.cell.number-2 { color: #4caf50; }
.cell.number-3 { color: #ff9800; }
.cell.number-4 { color: #9c27b0; }
.cell.number-5 { color: #f44336; }
.cell.number-6 { color: #00bcd4; }
.cell.number-7 { color: #795548; }
.cell.number-8 { color: #607d8b; }

.game-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-message.success {
    color: #4caf50;
}

.game-message.error {
    color: #f44336;
}

.game-message.info {
    color: var(--primary-color);
}

.game-instructions {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-instructions h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    margin-bottom: 10px;
    color: var(--text-gray);
    line-height: 1.6;
}

.game-instructions strong {
    color: var(--text-light);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--darker-bg);
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-header h2 {
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    margin: 0;
    text-align: center;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.modal-stat .stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.modal-stat span:last-child {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design for Game */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .difficulty-selector {
        flex-direction: column;
        gap: 5px;
    }
    
    .custom-settings {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-stats {
        gap: 20px;
    }
    
    .stat-item {
        padding: 10px 20px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-stats {
        gap: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cell {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .game-instructions {
        padding: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}
