/* ============================================
   CHASSE AUX RISQUES - DATA CENTER
   Styles principaux
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0f;
}

/* ============================================
   GAME CONTAINER
   ============================================ */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    cursor: crosshair;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   HUD - Heads Up Display
   ============================================ */
#hud {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#risk-counter {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(20, 30, 50, 0.9) 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
}

#camera-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

#counter-text {
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
}

#scene-indicator {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 15px;
    color: #888;
    font-size: 12px;
    text-align: center;
}

/* ============================================
   FLASH EFFECT
   ============================================ */
#flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    transition: opacity 0.1s ease-out;
}

#flash-overlay.flash {
    animation: flashAnimation 0.3s ease-out;
}

@keyframes flashAnimation {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
#success-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 150;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#success-message.hidden {
    opacity: 0;
    pointer-events: none;
}

.success-content {
    background: linear-gradient(135deg, rgba(0, 50, 0, 0.95) 0%, rgba(0, 100, 50, 0.95) 100%);
    border: 3px solid #00ff88;
    border-radius: 20px;
    padding: 30px 50px;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.4),
        inset 0 0 30px rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(10px);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-content h2 {
    color: #00ff88;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.success-content p {
    color: #ffffff;
    font-size: 18px;
    opacity: 0.9;
}

/* ============================================
   VICTORY SCREEN
   ============================================ */
#victory-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#victory-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.victory-content {
    text-align: center;
    animation: victoryPop 0.5s ease-out;
}

@keyframes victoryPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.victory-content h1 {
    font-size: 64px;
    color: #ffd700;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3);
    margin-bottom: 20px;
}

.victory-content p {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 40px;
    opacity: 0.9;
}

#restart-btn {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

#restart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
}

/* ============================================
   INSTRUCTIONS OVERLAY
   ============================================ */
#instructions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 10, 30, 0.98) 0%, rgba(20, 40, 80, 0.98) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 400;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#instructions-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.instructions-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.instructions-content h1 {
    font-size: 48px;
    color: #00d4ff;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.instructions-content h2 {
    font-size: 32px;
    color: #ff6b35;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.instructions-box {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.instructions-box p {
    font-size: 20px;
    color: #ffffff;
    margin: 15px 0;
    text-align: left;
}

.instructions-box strong {
    color: #00d4ff;
}

.goal {
    font-size: 18px;
    color: #ffd700;
    margin-bottom: 40px;
}

#start-btn {
    padding: 18px 60px;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

#start-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.6);
}

/* ============================================
   NAVIGATION HINT
   ============================================ */
#nav-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00d4ff;
    border-radius: 20px;
    padding: 10px 25px;
    color: #00d4ff;
    font-size: 14px;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#nav-hint.hidden {
    opacity: 0;
}

/* ============================================
   CURSOR STYLES
   ============================================ */
#game-container.nav-hover {
    cursor: pointer;
}

/* ============================================
   RISK MARKER (Canvas overlay for found risks)
   ============================================ */
.risk-found-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.3);
    border: 3px solid #00ff88;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    pointer-events: none;
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
#risk-counter.pulse {
    animation: counterPulse 0.5s ease-out;
}

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); border-color: #00ff88; }
    100% { transform: scale(1); }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    #risk-counter {
        padding: 10px 15px;
    }
    
    #camera-icon {
        font-size: 20px;
    }
    
    #counter-text {
        font-size: 18px;
    }
    
    .instructions-content h1 {
        font-size: 32px;
    }
    
    .instructions-content h2 {
        font-size: 24px;
    }
    
    .instructions-box p {
        font-size: 16px;
    }
}
