/* Mole Digger - Game Specific Styles */

/* Underground background */
.game-container {
    background: linear-gradient(180deg,
        #87CEEB 0%,
        #228B22 5%,
        #3d2817 8%,
        #2d1f12 50%,
        #1a1209 100%);
}

/* Game Title */
.game-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    font-weight: bold;
    color: #D2691E;
    text-shadow:
        0 0 10px rgba(210, 105, 30, 0.8),
        0 0 20px rgba(139, 69, 19, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 100;
    pointer-events: none;
}

/* Score Panel styling */
.score-panel {
    background: rgba(61, 40, 23, 0.9);
    border: 2px solid rgba(210, 105, 30, 0.5);
}

.score-value {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.high-score {
    font-size: 0.85rem;
    color: #DEB887;
    margin-top: 5px;
}

/* Depth Panel */
.depth-panel {
    position: absolute;
    top: 140px;
    left: 20px;
    background: rgba(61, 40, 23, 0.9);
    border: 2px solid rgba(210, 105, 30, 0.5);
    border-radius: 15px;
    padding: 10px 20px;
    text-align: center;
    z-index: 100;
}

.depth-label {
    font-size: 0.8rem;
    color: #DEB887;
    text-transform: uppercase;
}

.depth-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FF6347;
    text-shadow: 0 0 10px rgba(255, 99, 71, 0.5);
}

/* Power-up Display */
.powerup-display {
    position: absolute;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(61, 40, 23, 0.9);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 10px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 150;
    pointer-events: none;
}

.powerup-display.visible {
    opacity: 1;
    animation: powerupPulse 0.5s ease-out;
}

.powerup-icon {
    font-size: 2rem;
}

.powerup-name {
    font-size: 0.8rem;
    color: #FFD700;
    margin-top: 5px;
}

@keyframes powerupPulse {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Instructions */
.instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(61, 40, 23, 0.9);
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #DEB887;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 100;
    border: 2px solid rgba(210, 105, 30, 0.3);
}

/* Message popup */
.message-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 20px;
    background: rgba(61, 40, 23, 0.95);
    border: 4px solid #FFD700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 200;
    pointer-events: none;
    text-align: center;
}

.message-popup.visible {
    opacity: 1;
    animation: digPop 0.4s ease-out;
}

@keyframes digPop {
    0% { transform: translate(-50%, -50%) scale(0.3); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Game Over Overlay */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.game-over-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.game-over-title {
    font-size: 4rem;
    color: #FF6347;
    text-shadow: 0 0 30px rgba(255, 99, 71, 0.8);
    margin-bottom: 20px;
    animation: gameoverPulse 1s ease-in-out infinite;
}

@keyframes gameoverPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-over-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.game-over-stats .stat {
    font-size: 1.5rem;
    color: #DEB887;
}

.game-over-stats .stat span {
    color: #FFD700;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 1.3rem;
        top: 15px;
    }

    .depth-panel {
        top: 115px;
        left: 15px;
    }

    .instructions {
        font-size: 0.7rem;
        padding: 8px 15px;
    }

    .depth-value {
        font-size: 1.4rem;
    }

    .message-popup {
        font-size: 1.8rem;
        padding: 15px 25px;
    }

    .game-over-title {
        font-size: 2.5rem;
    }

    .game-over-stats .stat {
        font-size: 1.2rem;
    }
}
