/* Game Specific Styles */
.game-header {
    background-color: rgba(34, 34, 34, 0.95);
    border-bottom: 1px solid rgba(255, 0, 102, 0.3);
}

.nav-links .active {
    color: #ff0066;
}

.nav-links .active::after {
    width: 100%;
}

.game-container {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: radial-gradient(circle at center, rgba(255, 0, 102, 0.1) 0%, rgba(34, 34, 34, 0) 70%);
}

.game-wrapper {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Game Info Panel */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 0, 102, 0.2);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.info-section h3 {
    font-size: 14px;
    color: #ff0066;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

.counter {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #00ccff;
    background-color: #000;
    padding: 10px 15px;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(0, 204, 255, 0.3);
}

.reset-button {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 0, 102, 0.5);
    border-radius: 50%;
    background-color: #2a2a2a;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 102, 0.3);
}

.reset-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 0, 102, 0.5);
}

.reset-button:active {
    transform: scale(0.95);
}

/* Difficulty Selector */
.difficulty-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.difficulty-btn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.difficulty-btn:hover {
    background-color: rgba(255, 0, 102, 0.1);
    border-color: #ff0066;
    color: #ff0066;
}

.difficulty-btn.active {
    background-color: #ff0066;
    border-color: #ff0066;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 0, 102, 0.5);
}

/* Game Board Container */
.game-board-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.1) 0%, rgba(34, 34, 34, 0) 100%);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: auto;
}

/* Game Board */
.game-board {
    display: grid;
    gap: 2px;
    width: fit-content;
    margin: 0 auto;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Cell Styles */
.cell {
    width: 28px;
    height: 28px;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.1s ease;
    user-select: none;
}

.cell.hidden {
    background-color: #444;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.cell.hidden:hover {
    background-color: #555;
}

.cell.revealed {
    background-color: #2a2a2a;
    cursor: default;
}

.cell.flagged {
    background-color: #444;
    color: #ff0066;
}

.cell.flagged::before {
    content: '🚩';
    font-size: 18px;
}

.cell.mine.revealed {
    background-color: #ff0066;
    color: #ffffff;
}

.cell.mine.revealed::before {
    content: '💣';
    font-size: 18px;
}

.cell.mine.exploded {
    background-color: #ff6666;
    animation: explode 0.3s ease-out;
}

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

.cell.wrong-flag {
    background-color: #ff9999;
}

.cell.wrong-flag::before {
    content: '❌';
    font-size: 18px;
}

/* Number colors */
.cell.number-1 { color: #0066ff; }
.cell.number-2 { color: #00cc00; }
.cell.number-3 { color: #ff0000; }
.cell.number-4 { color: #6600cc; }
.cell.number-5 { color: #cc0066; }
.cell.number-6 { color: #00cccc; }
.cell.number-7 { color: #000000; }
.cell.number-8 { color: #999999; }

/* Game Instructions */
.game-instructions {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-instructions p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cccccc;
}

.key {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    color: #ff0066;
    font-weight: bold;
    border: 1px solid rgba(255, 0, 102, 0.3);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #2a2a2a;
    border: 3px solid #ff0066;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 0, 102, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    margin-bottom: 20px;
    color: #ff0066;
    text-shadow: 0 0 20px rgba(255, 0, 102, 0.5);
}

.modal p {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 12px 30px;
    background-color: #ff0066;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 102, 0.6);
}

/* Custom Game Form */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff0066;
    background-color: rgba(255, 0, 102, 0.1);
    box-shadow: 0 0 10px rgba(255, 0, 102, 0.3);
}

.form-group input::-webkit-inner-spin-button,
.form-group input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type=number] {
    -moz-appearance: textfield;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .game-container {
        padding: 20px 10px;
    }
    
    .game-info {
        padding: 15px;
    }
    
    .counter {
        font-size: 18px;
        padding: 8px 12px;
        min-width: 60px;
    }
    
    .reset-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .game-board-container {
        margin: 10px auto;
        max-width: 100%;
    }
    
    .cell {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .modal h2 {
        font-size: 24px;
    }
    
    .game-instructions {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .game-info {
        padding: 10px;
    }
    
    .info-section h3 {
        font-size: 12px;
    }
    
    .counter {
        font-size: 16px;
    }
    
    .cell {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .game-board {
        padding: 5px;
        gap: 1px;
    }
    
    .difficulty-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

/* Victory Animation */
@keyframes victoryPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 255, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(0, 255, 0, 0.8); }
}

.victory {
    animation: victoryPulse 1s ease-in-out infinite;
    background-color: rgba(0, 255, 0, 0.1) !important;
    border-color: #00ff00 !important;
}