/* Variables globales */
:root {
    --primary-color: #A970FF;
    --secondary-color: #FF0033;
    --tertiary-color: #5865F2;
    --background-dark: #1D0A21;
    --background-light: #381340;
    --text-color-dark: white;
    --text-color-light: #1D0A21;
    --confetti-color: #ff9800;
    --music-color: #4caf50;
    --reset-color: #3498db;
    --theme-btn-color: #9b59b6;
    --button-scale: 1.1;
}

/* Styles globaux */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle, var(--background-dark), var(--background-light));
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color-dark);
    transition: background 0.5s, color 0.5s;
}

/* Mode clair */
.light-mode {
    background: radial-gradient(circle, #f9f0ff, #e6c9ff);
    color: var(--text-color-light);
}

.light-mode .button {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.light-mode .footer-text {
    color: var(--text-color-light);
}

.light-mode .volume-control {
    color: var(--text-color-light);
}

.light-mode #hidden-message {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color-light);
}

.light-mode header h1 {
    color: black;
}

/* Container pour les boutons thème et reset */
.theme-reset-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* Style commun pour tous les boutons d'action */
#confetti-btn, #music-btn, #theme-btn, #reset-btn {
    width: 40px;
    height: 40px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: none;
}

/* Effet de survol simplifié */
#confetti-btn:hover, #music-btn:hover, #theme-btn:hover, #reset-btn:hover {
    opacity: 0.8;
    transform: none;
}

/* Positions et couleurs spécifiques */
#confetti-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--confetti-color);
}

#music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--music-color);
}

#theme-btn {
    background-color: var(--theme-btn-color);
}

#reset-btn {
    background-color: var(--reset-color);
}

/* En-tête */
header {
    background-color: transparent;
    color: white;
    padding: 1em;
    text-align: center;
    width: 100%;
}

header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4em;
    animation: pulsate 3s infinite;
    cursor: pointer;
}

@keyframes pulsate {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(var(--button-scale)); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Contenu principal */
main {
    padding: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Boutons des réseaux sociaux */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.button {
    padding: 15px 30px 15px 55px;
    font-size: 1.4em;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    position: relative;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.button:hover {
    padding-left: 60px;
    padding-right: 25px;
}

.button.twitch {
    background-color: #9146FF;
}

.button.twitch::before {
    background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/twitch.svg');
    filter: brightness(0) invert(1);
}

.button.youtube {
    background-color: #FF0000;
}

.button.youtube::before {
    background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/youtube.svg');
    filter: brightness(0) invert(1);
}

.button.discord {
    background-color: #5865F2;
}

.button.discord::before {
    background-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v5/icons/discord.svg');
    filter: brightness(0) invert(1);
}

/* Effets animés */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: fall linear infinite;
}

.big-confetti {
    position: absolute;
    width: 20px;
    height: 20px;
    animation: fall linear infinite;
}

.firework {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: yellow;
    animation: rise 1s ease-out, explode 1s ease-out 1s;
}

@keyframes fall {
    to { transform: translateY(100vh) rotate(360deg); }
}

@keyframes rise {
    to { transform: translateY(-80vh); }
}

@keyframes explode {
    to { transform: scale(30); opacity: 0; }
}

/* Easter egg */
.hidden {
    display: none;
}

#hidden-message {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
}

#easter-egg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
    z-index: 1000;
}

/* Texte en bas des boutons */
.footer-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1em;
    text-align: center;
    color: white;
    padding: 5px;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Contrôle du volume */
.volume-control {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

#volume-slider {
    width: 200px;
}

/* Media queries pour les appareils mobiles */
@media (max-width: 768px) {
    header h1 {
        font-size: 3em;
    }
    
    .button {
        padding: 12px 25px 12px 45px;
        font-size: 1.2em;
    }
    
    .button::before {
        width: 20px;
        height: 20px;
        left: 12px;
    }
    
    .button:hover {
        padding-left: 50px;
        padding-right: 20px;
    }
    
    #confetti-btn, #music-btn, #theme-btn, #reset-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    #volume-slider {
        width: 150px;
    }
    
    #hidden-message {
        font-size: 1.5em;
        padding: 15px;
    }
    
    #easter-egg-video {
        max-width: 90%;
        max-height: 90%;
    }
    
    .footer-text {
        font-size: 0.9em;
        padding: 4px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2.5em;
    }
    
    .button {
        padding: 10px 20px 10px 40px;
        font-size: 1em;
    }
    
    .button::before {
        width: 18px;
        height: 18px;
        left: 10px;
    }
    
    .button:hover {
        padding-left: 45px;
        padding-right: 15px;
    }
    
    #confetti-btn, #music-btn, #theme-btn, #reset-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    #volume-slider {
        width: 120px;
    }
    
    #hidden-message {
        font-size: 1.2em;
        padding: 10px;
    }
    
    #easter-egg-video {
        max-width: 95%;
        max-height: 95%;
    }
    
    .footer-text {
        font-size: 0.8em;
        padding: 3px;
    }
}

#music-menu {
  position: fixed;
  bottom: 70px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#music-menu.hidden {
  display: none;
}

.track-btn, #play-pause-btn {
  background-color: var(--music-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.track-btn:hover, #play-pause-btn:hover {
  opacity: 0.8;
}
