@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
  background: linear-gradient(45deg, #000428, #004e92, #9b59b6, #e74c3c, #f39c12);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
  font-family: 'Orbitron', monospace;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

.container {
  position: relative;
  z-index: 2;
  padding: 20px;
  text-align: center;
}

.main-title {
  font-size: clamp(2rem, 8vw, 6rem);
  font-weight: 900;
  margin: 50px 0;
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px #ff00ff,
    0 0 20px #ff00ff,
    0 0 25px #ff00ff,
    0 0 30px #ff00ff,
    0 0 35px #ff00ff;
  animation: pulse 2s ease-in-out infinite alternate;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite alternate, gradientShift 3s ease infinite;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.magic-wand {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
  margin: 0 20px;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.subtitle {
  font-size: clamp(1rem, 4vw, 2rem);
  margin: 30px 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 20px #fff, 0 0 30px #00ffff, 0 0 40px #00ffff; }
  to { text-shadow: 0 0 30px #fff, 0 0 40px #ff00ff, 0 0 50px #ff00ff; }
}

.state-default {
  .mod-stay {
    display: none;
  }
}

.state-leaving {
  .mod-party {
    display: none;
  }
}

.state-staying {
  .mod-stay {
    display: none;
  }
}

.party-section {
  margin: auto;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 30px;
  margin: 50px auto;
  max-width: 800px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 0 30px rgba(255, 0, 255, 0.5),
    inset 0 0 30px rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10;
}

.disco-ball {
  width: 100px; /* Ajout d'une taille par défaut */
  height: 100px; /* Ajout d'une taille par défaut */
  margin: 20px auto;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 30% 30%, #ffffff, transparent 50%),
    linear-gradient(45deg, #c0c0c0, #ffd700, #c0c0c0, #ffd700);
  animation: spin 4s linear infinite;
  box-shadow: 
    0 0 50px rgba(255, 215, 0, 0.8),
    inset 0 0 20px rgba(255, 255, 255, 0.5),
    0 0 100px rgba(255, 215, 0, 0.4);
  position: relative;
  z-index: 15;
  border: 2px solid rgba(255, 215, 0, 0.8);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.disco-ball::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, transparent 40%, rgba(255, 215, 0, 0.3) 41%, rgba(255, 215, 0, 0.3) 59%, transparent 60%);
  transform: translate(-50%, -50%);
  animation: spin 2s linear infinite reverse;
  z-index: 16;
}

.disco-ball::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent);
  border-radius: 50%;
  z-index: 17;
}

.party-text {
  font-size: 1.5rem;
  line-height: 1.6;
  margin: 20px 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  color: #fff; /* Correction de la couleur du texte */
}

.magic-effects {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 40px 0;
}

.effect-item {
  font-size: 2rem;
  margin: 10px;
  animation: bounce 2s ease infinite;
  filter: drop-shadow(0 0 10px currentColor);
}

.effect-item:nth-child(1) { animation-delay: 0s; }
.effect-item:nth-child(2) { animation-delay: 0.3s; }
.effect-item:nth-child(3) { animation-delay: 0.6s; }
.effect-item:nth-child(4) { animation-delay: 0.9s; }
.effect-item:nth-child(5) { animation-delay: 1.2s; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

.party-button {
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite, buttonGlow 2s ease infinite;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #000;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  cursor: pointer;
  text-transform: uppercase;
  font-family: 'Orbitron', monospace;
  margin: 20px 10px;
  box-shadow: 
    0 0 20px rgba(255, 0, 255, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 20;
}

.party-button:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 30px rgba(255, 0, 255, 0.8),
    0 0 50px rgba(0, 255, 255, 0.6),
    inset 0 0 30px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
}

@keyframes buttonGlow {
  0%, 100% { 
    box-shadow: 
      0 0 20px rgba(255, 0, 255, 0.5),
      inset 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% { 
    box-shadow: 
      0 0 30px rgba(0, 255, 255, 0.7),
      0 0 50px rgba(255, 255, 0, 0.5),
      inset 0 0 25px rgba(255, 255, 255, 0.3);
  }
}

.y2k-border {
  border: 3px solid transparent;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff) border-box;
}

.sparkle {
  position: fixed;
  pointer-events: none;
  font-size: 20px;
  animation: sparkleAnimation 3s ease-out forwards;
  z-index: 1000;
}

@keyframes sparkleAnimation {
  0% {
    opacity: 1;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(360deg);
  }
}

/* Responsive design amélioré */
@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  
  .main-title {
    font-size: clamp(1.5rem, 12vw, 3rem);
    margin: 20px 0;
  }
  
  .magic-wand {
    font-size: 2rem;
    margin: 0 10px;
  }
  
  .subtitle {
    font-size: clamp(0.8rem, 6vw, 1.2rem);
    margin: 20px 0;
  }
  
  .party-section {
    padding: 15px;
    border-radius: 15px;
  }
  
  .disco-ball {
    width: 60px;
    height: 60px;
    margin: 10px auto;
    border: 2px solid rgba(255, 215, 0, 0.9);
    box-shadow: 
      0 0 30px rgba(255, 215, 0, 0.8),
      inset 0 0 15px rgba(255, 255, 255, 0.5),
      0 0 60px rgba(255, 215, 0, 0.4);
  }
  
  .party-text {
    font-size: 1rem;
    line-height: 1.4;
    margin: 15px 0;
  }
  
  .magic-effects {
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 20px 0;
  }
  
  .effect-item {
    font-size: 1.5rem;
    margin: 5px;
  }
  
  .party-button {
    padding: 12px 20px;
    font-size: 0.9rem;
    margin: 10px 5px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
      0 0 15px rgba(255, 0, 255, 0.6),
      inset 0 0 15px rgba(255, 255, 255, 0.2);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .main-title {
    font-size: clamp(2rem, 10vw, 4rem);
    margin: 30px 0;
  }
  
  .magic-wand {
    font-size: 2.5rem;
    margin: 0 15px;
  }
  
  .subtitle {
    font-size: clamp(1rem, 5vw, 1.5rem);
    margin: 25px 0;
  }
  
  .party-section {
    padding: 20px;
  }
  
  .disco-ball {
    width: 80px;
    height: 80px;
    margin: 15px auto;
    border: 2px solid rgba(255, 215, 0, 0.9);
    box-shadow: 
      0 0 40px rgba(255, 215, 0, 0.8),
      inset 0 0 18px rgba(255, 255, 255, 0.5),
      0 0 80px rgba(255, 215, 0, 0.4);
  }
  
  .party-text {
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 18px 0;
  }
  
  .magic-effects {
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 30px 0;
  }
  
  .effect-item {
    font-size: 1.8rem;
    margin: 8px;
  }
  
  .party-button {
    padding: 13px 25px;
    font-size: 1rem;
    margin: 15px 8px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
      0 0 18px rgba(255, 0, 255, 0.6),
      inset 0 0 18px rgba(255, 255, 255, 0.2);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 20px;
  }
  
  .main-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin: 40px 0;
  }
  
  .party-section {
    padding: 25px;
    max-width: 700px;
  }
  
  .disco-ball {
    width: 90px;
    height: 90px;
  }
  
  .party-text {
    font-size: 1.3rem;
  }
  
  .effect-item {
    font-size: 1.9rem;
    margin: 12px;
  }
  
  .party-button {
    padding: 14px 28px;
    font-size: 1.1rem;
    margin: 18px 12px;
  }
}

@media (min-width: 1025px) {
  .container {
    padding: 25px;
  }
  
  .party-section {
    padding: 30px;
    max-width: 900px;
  }
}

/* Orientation paysage pour mobiles */
@media (max-width: 768px) and (orientation: landscape) {
  .main-title {
    font-size: clamp(1.8rem, 8vw, 3.5rem);
    margin: 15px 0;
  }
  
  .subtitle {
    font-size: clamp(0.9rem, 4vw, 1.3rem);
    margin: 15px 0;
  }
  
  .party-section {
    padding: 20px;
  }
  
  .disco-ball {
    width: 70px;
    height: 70px;
    margin: 10px auto;
  }
  
  .party-text {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 15px 0;
  }
  
  .magic-effects {
    margin: 20px 0;
  }
  
  .effect-item {
    font-size: 1.6rem;
    margin: 8px;
  }
  
  .party-button {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin: 10px 5px;
  }
}

/* Très petits écrans */
@media (max-width: 320px) {
  .container {
    padding: 8px;
  }
  
  .main-title {
    font-size: clamp(1.2rem, 15vw, 2.5rem);
    margin: 15px 0;
  }
  
  .magic-wand {
    font-size: 1.5rem;
    margin: 0 8px;
  }
  
  .subtitle {
    font-size: clamp(0.7rem, 8vw, 1rem);
    margin: 15px 0;
  }
  
  .party-section {
    padding: 12px;
    border-radius: 12px;
  }
  
  .disco-ball {
    width: 50px;
    height: 50px;
    margin: 8px auto;
    border: 2px solid rgba(255, 215, 0, 1);
    box-shadow: 
      0 0 25px rgba(255, 215, 0, 0.9),
      inset 0 0 12px rgba(255, 255, 255, 0.5),
      0 0 50px rgba(255, 215, 0, 0.5);
  }
  
  .party-text {
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 12px 0;
  }
  
  .magic-effects {
    margin: 15px 0;
  }
  
  .effect-item {
    font-size: 1.3rem;
    margin: 3px;
  }
  
  .party-button {
    padding: 10px 15px;
    font-size: 0.8rem;
    margin: 8px 3px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
      0 0 12px rgba(255, 0, 255, 0.7),
      inset 0 0 12px rgba(255, 255, 255, 0.3);
  }
}