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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

/* Bouton Labs en haut à gauche */
.labs-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.labs-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#rain-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    transition: background 0.5s ease;
}

#rain-container.stormy {
    background: linear-gradient(135deg, #1a1a1a, #2c3e50);
}

#rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
    width: 2px;
    border-radius: 0 0 50% 50%;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.heavy-rain {
    width: 3px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
}

.storm-rain {
    width: 4px;
    background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0.6));
}

#lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0);
    pointer-events: none;
    z-index: 1000;
}

#lightning.flash {
    background: rgba(255,255,255,0.9);
    animation: lightning-flash 0.2s ease-out;
}

@keyframes lightning-flash {
    0% { background: rgba(255,255,255,0.9); }
    50% { background: rgba(255,255,255,0.6); }
    100% { background: rgba(255,255,255,0); }
}

#controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 1001;
    min-width: 300px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.control-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 1.2em;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 1em;
    transition: background 0.3s ease;
}

button:hover {
    background: #2980b9;
}

button:active {
    transform: scale(0.98);
}

#lightning-btn {
    background: #f39c12;
}

#lightning-btn:hover {
    background: #e67e22;
}

.splash {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: splash 0.3s ease-out forwards;
}

@keyframes splash {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    #controls {
        width: calc(100% - 40px);
        min-width: auto;
    }
    
    h1 {
        font-size: 1.2em;
    }
    
    button {
        width: 100%;
        margin: 5px 0;
    }
}