html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  font-family: 'Pacifico', cursive;
  text-align: center;
}

#homePage, #lotteryPage {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

#dice-canvas, #dice-canvas2 {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  background: url('images/bg-clean.png') no-repeat center center;
  background-size: cover;
}

.content {
  position: relative;
  z-index: 1;
  color: #fff;
  margin-top: 20vh;
}

h1 {
  font-size: 4em;
  text-shadow: 0 0 10px #ffcc00;
  font-family: 'Pacifico', cursive;
  margin-top: 250px;
  margin-bottom: 40px;
}

.button-container {
  margin-top: 30px;
}

.button {
  display: inline-block;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 8px 0 #c5376d, 0 15px 20px rgba(0, 0, 0, .35);
  font-size: 50px;
  color: #fff;
  text-decoration: none;
  font-family: 'Pacifico', Arial, sans-serif;
  transition: transform 0.1s ease-in-out;
}

.button span {
  display: inline-block;
  padding: 3px 7px;
  background-color: #ec528d;
  background-image: linear-gradient(hsla(338, 90%, 80%, .8), hsla(338, 90%, 70%, .2));
  border-radius: 8px;
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, .15);
  text-shadow: 0 -1px 1px rgba(175, 49, 95, .7);
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.button:hover span {
  background-color: #ec6a9c;
  text-shadow: 0 -1px 1px rgba(175, 49, 95, .9), 0 0 5px rgba(255, 255, 255, .8);
}

.button:active span {
  transform: translateY(4px);
}

#connectWallet {
  position: fixed; /* Fixe le bouton en haut à droite */
  top: 20px;
  right: 20px;
  z-index: 1000;
  font-size: 1.2rem;
  padding: 12px 24px;
  background-color: #ec528d;
  background-image: linear-gradient(hsla(338, 90%, 80%, .8), hsla(338, 90%, 70%, .2));
  border: none;
  border-radius: 8px;
  color: white;
  box-shadow: 0 8px 0 #c5376d, 0 15px 20px rgba(0, 0, 0, .35);
  font-family: 'Pacifico', Arial, sans-serif;
  cursor: pointer;
  transition: transform 0.1s ease-in-out;
}

#connectWallet:hover {
  background-color: #ec6a9c;
}

#connectWallet:active {
  transform: scale(0.95);
}

.social-icons {
  position: fixed; /* Fixe les icônes sociales en bas au centre */
  bottom: 40px; /* Distance de 40px par rapport au bas */
  left: 50%; /* Centre horizontalement */
  transform: translateX(-50%); /* Ajuste l'alignement pour centrer les icônes */
  z-index: 5;
  display: flex;
  gap: 10px;

}

.social-icons a {
  color: #fff;
  background: #DB6E82;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-family: FontAwesome;
  font-size: 18px;
  display: inline-block;
  width: 40px;
  height: 28px;
  padding-top: 12px;
  margin: 0 6px;
  transition: all 0.5s;
}

.social-icons a:hover {
  background: #ef92a3;
}

/* Tooltip */
.social-icons a span {
  color: #666;
  font-family: sans-serif;
  position: absolute;
  bottom: 0;
  left: -25px;
  right: -25px;
  padding: 5px 7px;
  z-index: -1;
  font-size: 14px;
  border-radius: 2px;
  background: #fff;
  visibility: hidden;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

}

.social-icons a span:before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #fff;
  position: absolute;
  bottom: -5px;
  left: 40px;
}

/* Icons */
.social-icons a:nth-of-type(1)::before {
  content: '\f099'; /* Twitter */
}
.social-icons a:nth-of-type(2)::before {
  content: '\f2c6'; /* Telegram */
}
.social-icons a:nth-of-type(3)::before {
  content: '\f015'; /* Home icon */
}

.fade-in {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

@keyframes chromaWave {
  0% {
    filter: blur(10px) brightness(0.5) contrast(2);
    transform: scale(1.2) skewX(10deg);
    opacity: 0;
  }
  50% {
    filter: blur(5px) brightness(1.2) contrast(1.5);
    transform: scale(1.05) skewX(-5deg);
    opacity: 0.5;
  }
  100% {
    filter: blur(0) brightness(1) contrast(1);
    transform: scale(1) skewX(0deg);
    opacity: 1;
  }
}

.chroma-appear {
  animation: chromaWave 1s ease-out forwards;
}
 #tickerWrapper {
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
        }

#ticker {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #ec528d;
  color: white;
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1000;
  display: none; /* Masquer la bannière par défaut */
  justify-content: center;
  align-items: center;
  height: 30px;
  text-align: center;
}

#tickerContent {
  display: flex;
  justify-content: center; /* Centrer horizontalement */
  align-items: center; /* Centrer verticalement */
  padding-left: 100%;
  animation: tickerScroll 20s linear infinite;
}

@keyframes tickerScroll {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}
/* ----------- Responsive Design ----------- */

/* Pour tablettes et petits écrans */
@media screen and (max-width: 1024px) {
  h1 {
    font-size: 3em;
    margin-top: 150px;
  }

  .button {
    font-size: 2.5rem;
  }

  #connectWallet {
    font-size: 1rem;
    padding: 10px 18px;
  }

  .social-icons a {
    font-size: 16px;
    width: 36px;
    height: 26px;
    padding-top: 10px;
    flex-direction: row;
  }

}

/* Pour mobiles */
@media screen and (max-width: 600px) {
  h1 {
    font-size: 2em;
    margin-top: 100px;
  }

  .button {
    font-size: 1.5rem;
    margin: 8px;
  }

  .button span {
    padding: 5px 10px;
  }

  #connectWallet {
    font-size: 0.9rem;
    padding: 8px 14px;
    top: 10px;
    right: 10px;
  }

  .social-icons {
    flex-direction: row; /* si tu veux qu'elles restent horizontales */
    gap: 10px;
    height: auto;
    bottom: 35px; /* 👈 augmente la distance du bas */
  }

  .social-icons a {
    width: auto;
    height: auto;
    padding: 10px;
    font-size: 14px;

  }
  #enterButton {
  margin-top: 100px; /* Ajuste selon la hauteur souhaitée */
}
#title {
  margin-top: 275px; /* Ajuste selon la hauteur souhaitée */
}

  #stats24h, #contractAddress, #epochTimer, #lastWinner {
    font-size: 0.9rem;
    padding: 0 10px;
  }

  #tickerContent {
    font-size: 0.9rem;
    animation-duration: 10s; /* plus rapide sur mobile */
  }
}
.content {
  position: relative;
  z-index: 1;
  color: #fff;
  margin-top: 10vh; /* ↓ Avant : 20vh */
}
/* Styles pour l'animation chromatique du pop-up */
/* Animation chroma pour le pop-up */
@keyframes chromaEffect {
  0% {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    background-color: rgba(236, 82, 141, 0); /* Début transparent */
  }
  50% {
    opacity: 0.7;
    background-color: rgba(236, 82, 141, 0.8); /* Légèrement visible */
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    background-color: rgba(236, 82, 141, 1); /* Pleinement visible */
  }
}

/* Pop-up avec animation */
#popupWindow {
  display: none;
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;;
  padding: 30px;
  background: url('images/bg-clean.png') no-repeat center center;
  border: 2px solid rgba(255, 215, 0, 0.3); /* léger bord doré translucide */
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(245, 210, 0, 0.3);
  z-index: 1001;
  opacity: 0;
  animation: chromaEffect 1s ease-out forwards;
  font-family: 'Arial', sans-serif;
  backdrop-filter: blur(8px); /* effet de flou stylé */
}

#closePopup {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  color: #F5D200;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 24px;
  transition: color 0.3s;
  background: #ec528d;

}

#closePopup:hover {
  color: #ec528d;
}
