/* === Dynasty Jackpot: Imperial Edition === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Serif SC', 'Poppins', serif;
  background: radial-gradient(circle at top, #1a0000 0%, #000 85%);
  color: #F7F4EA;
  text-align: center;
  overflow-x: hidden;
  position: relative;
  z-index: 0; /* ensures proper stacking order */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(255, 215, 0, 0.2);
}

/* === Subtle Animated Dragon Background === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: -200px;
  width: 100%;
  height: 100%;
  background: url('dragon-silhouette.png') no-repeat center center;
  background-size: 600px auto;
  opacity: 0.08;
  animation: dragon-fly 60s linear infinite;
  z-index: -2; /* 👑 permanently behind everything */
  pointer-events: none; /* allows clicks to pass through */
}

/* === Floating Lanterns / Balloons Canvas (behind everything) === */
#lanternCanvas {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3 !important; /* 🏮 keeps it behind the dragon */
  pointer-events: none;
}

/* === Dragon Flight Animation === */
@keyframes dragon-fly {
  0% {
    transform: translateX(-20%) translateY(5%) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateX(50%) translateY(-10%) rotate(5deg);
    opacity: 0.15;
  }
  100% {
    transform: translateX(120%) translateY(10%) rotate(0deg);
    opacity: 0.1;
  }
}



/* === Header === */
.top-header {
  background: linear-gradient(90deg, #2b0000 0%, #400000 50%, #2b0000 100%);
  border-bottom: 3px solid #D4AF37;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
  flex-wrap: wrap;
  gap: 0.5rem;
}


.contract-address {
  flex: 1;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: #ffd700;
  word-break: break-all; /* keeps long address readable */
}

.contract-address {
  flex: 1;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: #FFD700;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 90vw;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .top-header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
  }

  .contract-address {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    padding: 0.5rem;
    order: 3;
    width: 100%;
  }

  .logo {
    order: 1;
  }

  .menu-toggle {
    order: 2;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }
}




.logo {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  color: #FFD700;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* === Navigation Bar (Imperial Red & Golden Edition) === */
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(180deg, rgba(43, 0, 0, 0.95), rgba(20, 0, 0, 0.85));
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
  border-bottom: 2px solid #FFD700; /* Golden border */
  border-radius: 0 0 20px 20px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
}

/* === Links === */
.nav-link {
  color: #FFD700; /* Gold text */
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* === Hover Effects === */
.nav-link:hover {
  color: #FF3131; /* Imperial Red hover */
  text-shadow: 0 0 10px #FFD700;
  transform: scale(1.08);
}

/* === Highlight External Link === */
.nav-link.highlight {
  color: #FFD700;
  border: 1.5px solid #FFD700;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(43, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.nav-link.highlight:hover {
  background: linear-gradient(90deg, #FFD700, #FF3131);
  color: #000;
  text-shadow: none;
  transform: scale(1.1);
}



/* === HERO SECTION === */
.hero {
  text-align: center;
  padding: clamp(2rem, 8vw, 4.5rem) clamp(1rem, 3vw, 2rem);
  color: #FFD700;
  font-family: 'Noto Serif SC', serif;
  position: relative;
  z-index: 5;
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  color: #FFD700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
  line-height: 1.3;
}

.hero .subtitle {
  color: #F7F4EA;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.7em;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

/* === JACKPOT OVERVIEW === */
.jackpot-overview {
  background: rgba(43, 0, 0, 0.8);
  border: 2px solid #FFD700;
  border-radius: 15px;
  padding: clamp(1.25rem, 4vw, 2rem);
  max-width: min(650px, 95vw);
  margin: 0 auto;
  color: #F7F4EA;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.jackpot-overview h2 {
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  margin-bottom: 15px;
}

.jackpot-tiers {
  list-style: none;
  padding: 0;
  margin: 15px 0 25px 0;
  text-align: left;
}

.jackpot-tiers li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  color: #F7F4EA;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.5;
}

/* === x402 Payments Banner (Imperial Red & Golden Edition) === */
.x402-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  background: rgba(43, 0, 0, 0.85); /* Imperial red tone */
  border: 2px solid #FFD700; /* Golden border */
  border-radius: 12px;
  padding: clamp(0.625rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.25rem);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  color: #FFD700; /* Golden text */
  font-family: 'Noto Serif SC', serif;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease-in-out;
  animation: fadeIn 0.8s ease;
  max-width: fit-content;
  margin: 0 auto clamp(1rem, 3vw, 1.5rem) auto;
  white-space: nowrap;
}

.x402-banner:hover {
  background: rgba(80, 0, 0, 0.9);
  color: #FFF3B0;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
  animation: golden-glow 1.5s infinite alternate;
}

.x402-icon {
  font-size: 1.4rem;
}

.x402-text {
  color: inherit;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 600px) {
  .main-btn {
    width: 100%;
    font-size: 0.95rem;
  }
  .x402-banner {
    flex-wrap: wrap;
    text-align: center;
    white-space: normal;
    max-width: 90%;
    padding: 0.75rem 1rem;
  }
  .x402-icon {
    font-size: 1.2rem;
  }
  .x402-text {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  }
}



/* === TAX & DISTRIBUTION BOXES === */
.tax-box, .distribution-box {
  background: rgba(43, 0, 0, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-top: clamp(1rem, 3vw, 1.5rem);
  text-align: left;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.tax-box h3, .distribution-box h3 {
  color: #FFD700;
  margin-bottom: 12px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.tax-box ul {
  list-style: none;
  padding-left: 10px;
  margin: 0;
}

.tax-box li {
  padding: 5px 0;
  color: #F7F4EA;
}

.distribution-box p {
  color: #ffe9fb;
  margin: 5px 0;
}

/* === MEGA TIMER === */
.mega-timer {
  margin-top: 25px;
  font-size: 1.1em;
  color: #FFD700;
  text-align: center;
  font-family: monospace;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}


/* === Jackpot Counter === */
.jackpot-counter {
  background: rgba(43, 0, 0, 0.8);
  border: 3px solid #FFD700;
  border-radius: 15px;
  display: inline-block;
  padding: 25px 50px;
  color: #F7F4EA;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
  position: relative;
  z-index: 5;
}
#jackpot-amount {
  font-size: 2.8rem;
  color: #FFD700;
  font-weight: bold;
}

/* === Unified Pool & Winner Design === */
.pools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 3rem);
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: 0 1rem;
}

.pool-row,
.winner-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
  max-width: 1200px;
  justify-content: center;
}

/* === Pool Cards === */
.pool {
  background: rgba(43, 0, 0, 0.85);
  border: 2px solid #D4AF37;
  border-radius: 15px;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1rem, 2.5vw, 1.5rem);
  text-align: center;
  color: #F7F4EA;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pool:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.pool h3 {
  color: #FFD700;
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  line-height: 1.3;
}

.pool p {
  color: #F7F4EA;
  margin: 0.5rem 0;
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.5;
}

.pool .pool-prize {
  margin-top: 10px;
  font-weight: bold;
  color: #FFD700;
}

.pool .timer {
  margin-top: 8px;
  font-family: monospace;
  color: #FFD700;
}

/* === Winner Boxes (Below Pools) === */
.winner-box {
  background: rgba(43, 0, 0, 0.9);
  border: 2px solid #D4AF37;
  border-radius: 15px;
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 2.5vw, 1.5rem);
  color: #F7F4EA;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  text-align: left;
  max-width: min(340px, 100%);
  margin: 0 auto;
  width: 100%;
}

.winner-box h4 {
  color: #FFD700;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  margin-bottom: 0.75rem;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  line-height: 1.3;
}

.winner-box p {
  margin: 0.5rem 0;
  font-size: clamp(0.85rem, 2vw, 0.92rem);
  color: #F7F4EA;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.winner-box strong {
  color: #FFD700;
}

/* === Layout Fix: Pools Top, Winners Below === */
.pools {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pool-row {
  margin-bottom: 20px;
}

.winner-row {
  margin-top: -10px;
}

/* === Mobile Hamburger Menu (Dynasty Style) === */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 38px;
  cursor: pointer;
  z-index: 200;
  border: 2px solid rgba(255, 215, 0, 0.6);
  border-radius: 8px;
  background: rgba(43, 0, 0, 0.85);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  transition: all 0.3s ease;
}

/* Lines */
.menu-toggle span {
  background: linear-gradient(90deg, #FFD700, #FF3131); /* gold → red */
  height: 3px;
  width: 26px;
  margin: 4px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

/* Animate to X when open */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #FF3131;
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.8);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: #FF3131;
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.8);
}

/* Hover / Tap glow */
.menu-toggle:hover,
.menu-toggle.open {
  background: linear-gradient(90deg, rgba(255, 49, 49, 0.25), rgba(255, 215, 0, 0.25));
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 0 25px rgba(255, 49, 49, 0.3);
  border-color: #FFD700;
}

/* === Responsive navigation === */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    background: rgba(43, 0, 0, 0.95);
    border-bottom: 2px solid #FFD700;
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(6px);
    display: none;
    padding: 15px 0;
  }

  .nav.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }
}

.dev-burn-section {
  background: rgba(30, 0, 0, 0.7);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin: clamp(1.5rem, 4vw, 2rem) auto;
  max-width: min(1000px, 95vw);
  color: #ffd700;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

#burn-history {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  overflow-x: auto;
  display: block;
}

#burn-history thead,
#burn-history tbody,
#burn-history tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

#burn-history th, #burn-history td {
  border: 1px solid rgba(255, 215, 0, 0.2);
  padding: clamp(0.5rem, 1.5vw, 0.75rem);
  text-align: center;
  overflow-wrap: break-word;
}

#burn-history th {
  background: rgba(255, 215, 0, 0.1);
  color: #fff;
}


/* === Mobile Optimization === */
@media (max-width: 768px) {
  .pool-row,
  .winner-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pool,
  .winner-box {
    max-width: 100%;
    width: 100%;
  }

  .pool:hover {
    transform: translateY(-2px);
  }
}

footer {
  margin-top: 50px;
  padding: 25px;
  border-top: 1px solid #FFD700;
  font-size: 0.9rem;
  color: #F7F4EA;
  background: rgba(43, 0, 0, 0.8);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

footer a {
  color: #FFD700;
  text-decoration: none;
  transition: 0.3s;
}

footer a:hover {
  text-decoration: underline;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

footer .disclaimer {
  margin-top: 20px;
  font-size: 0.85rem;
  line-height: 1.5em;
  color: #F7F4EA;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  padding-top: 15px;
}

footer .disclaimer strong {
  color: #FFD700;
  font-size: 0.95rem;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

footer .disclaimer p:last-child {
  margin-top: 8px;
  color: #FFD700;
  font-weight: bold;
}

/* === Responsive === */
@media (max-width: 768px) {
  .pools {
    flex-direction: column;
    align-items: center;
  }
  .pool {
    width: 90%;
  }
}

/* === Previous Winners Section === */
.winners {
  padding: 40px 10px;
  border-top: 1px solid #FFD700;
  background: rgba(43, 0, 0, 0.8);
  border-radius: 15px;
  max-width: 800px;
  margin: 50px auto;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.winners h2 {
  color: #FFD700;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  font-size: 1.5rem;
}

#winners-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#winners-list li {
  background: rgba(43, 0, 0, 0.9);
  margin: 10px auto;
  padding: 12px 15px;
  border-radius: 10px;
  width: 90%;
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #F7F4EA;
  font-size: 0.95rem;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

#winners-list li a {
  color: #FFD700;
  text-decoration: underline;
  transition: 0.3s;
}

#winners-list li a:hover {
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .winners {
    width: 95%;
    padding: 30px 10px;
  }

  #winners-list li {
    font-size: 0.9rem;
    width: 100%;
  }
}


/* === Developer Panel === */
#dev-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 15px 20px;
  color: #ff69b4;
  z-index: 9999;
  font-family: 'Courier New', monospace;
  box-shadow: 0 0 20px rgba(255, 80, 200, 0.3);
  transition: all 0.3s ease;
}

#dev-panel.hidden {
  display: none;
}

#dev-panel h3 {
  margin: 0 0 10px;
  color: #ffc6f8;
  text-shadow: 0 0 4px #ff4fd8;
}

.dev-buttons button {
  background: #ff4fd8;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 3px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.dev-buttons button:hover {
  background: #ff91ec;
  transform: scale(1.05);
}

.dev-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #999;
  text-align: center;
}

/* === MEGA JACKPOT FEATURE SECTION (Imperial Grand Edition) === */
.mega-highlight {
  text-align: center;
  margin: clamp(2rem, 6vw, 4rem) auto;
  padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(43, 0, 0, 0.9), rgba(60, 0, 0, 0.85));
  border: 3px solid #FFD700;
  border-radius: 20px;
  max-width: min(800px, 95vw);
  color: #F7F4EA;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.mega-jackpot-box h2 {
  font-size: clamp(1.75rem, 5.5vw, 2.8rem);
  color: #FFD700;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 1px;
  line-height: 1.2;
}

.mega-jackpot-box .intro {
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  color: #FFF3B0;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  line-height: 1.4;
}

.pool-prize.large {
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  font-weight: bold;
  color: #FFD700;
  margin: clamp(0.75rem, 2vw, 1rem) 0;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  line-height: 1.3;
}

.timer.large {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: #FFF3B0;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  line-height: 1.3;
}

.bnb-balance {
  font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  color: #FFD700;
  font-weight: 700;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  line-height: 1.4;
}

.mega-jackpot-box .note {
  font-size: clamp(0.95rem, 2.3vw, 1.1rem);
  line-height: 1.6;
  color: #F7F4EA;
  max-width: min(700px, 100%);
  margin: 0 auto;
  background: rgba(43, 0, 0, 0.5);
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Optional glow animation for "The Mega Jackpot" title */
@keyframes mega-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
  50% { text-shadow: 0 0 25px rgba(255, 215, 0, 1); }
}

.mega-jackpot-box h2 {
  animation: mega-glow 2s infinite alternate;
}

/* === MEGA WINNER BOX === */
.winner-box.highlight {
  background: rgba(43, 0, 0, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin: clamp(1.25rem, 3vw, 1.75rem) auto 0 auto;
  max-width: min(700px, 95vw);
  color: #F7F4EA;
  text-align: left;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

.winner-box.highlight h3 {
  color: #FFD700;
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  line-height: 1.3;
}

.winner-box.highlight p {
  margin: 0.5rem 0;
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.winner-box.highlight strong {
  color: #FFD700;
}

.bnb-balance {
  margin-top: 15px;
  font-size: 1.1em;
  color: #FFD700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}
/* === Winner Row Layout === */
.winner-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

/* === Winner Box Blur System (Imperial Red & Golden Edition) === */
.winner-box {
  position: relative;
  width: 300px;
  min-height: 180px;
  padding: 15px;
  border: 2px solid #FFD700; /* Golden border */
  border-radius: 16px;
  background: rgba(43, 0, 0, 0.85);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0.95;
  color: #F7F4EA;
}

.winner-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

/* Blur only the content (until revealed) */
.winner-box .content {
  filter: blur(6px);
  transition: filter 0.8s ease;
  pointer-events: none;
  color: #F7F4EA;
}

.winner-box.revealed .content {
  filter: blur(0);
  pointer-events: auto;
  color: #FFFFFF;
}

/* === Overlay (shown when hidden) === */
.winner-box .overlay {
  position: absolute;
  inset: 0;
  background: rgba(230, 57, 70, 0.15);
  color: #FFD700;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
  transition: opacity 0.8s ease, visibility 0.8s ease;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(8px);
  border-radius: 16px;
  animation: pulseOverlay 2s infinite ease-in-out;
  visibility: visible; /* default visible */
  opacity: 1;
}

@keyframes pulseOverlay {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* When revealed — fade out and remove completely */
.winner-box.revealed .overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  backdrop-filter: none;
  transition: opacity 0.6s ease, visibility 0s 0.6s;
}


/* === “View All” Button === */
.view-all-container {
  text-align: center;
  margin-top: 10px;
}

.view-all-btn {
  color: #FFD700;
  border: 1px solid #FFD700;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  background: transparent;
}

.view-all-btn:hover {
  background: #FFD700;
  color: #2b0000;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 8px;
  background: rgba(43, 0, 0, 0.8);
  color: #FFD700;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}

.pagination button:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: scale(1.05);
}

.pagination button.active {
  background: #e63946; /* Imperial red active state */
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
}

.new-winner {
  animation: glow 1s ease-in-out alternate 3;
}
@keyframes glow {
  from { background: rgba(255, 255, 0, 0.2); }
  to { background: transparent; }
}


/* === Follow & Compatibility Buttons (Imperial Red & Golden Edition) === */
.extra-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1rem);
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  flex-wrap: wrap;
  padding: 0 1rem;
}

.main-btn {
  background: rgba(43, 0, 0, 0.85); /* Imperial red tone */
  border: 2px solid #FFD700; /* Golden border */
  color: #FFD700;
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  padding: clamp(0.625rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.25rem);
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  transition: all 0.25s ease-in-out;
  white-space: nowrap;
}

.main-btn:hover {
  background: rgba(80, 0, 0, 0.9);
  color: #FFF3B0; /* Softer gold glow */
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
  transform: scale(1.07);
}

@keyframes golden-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  }
}

.main-btn:hover {
  animation: golden-glow 1.5s infinite alternate;
}

/* === Touch and Mobile Optimizations === */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .pool:hover,
  .winner-box:hover {
    transform: none;
  }

  /* Make buttons and links easier to tap */
  .nav-link,
  .main-btn,
  .chat-send-btn,
  button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Add active states for better touch feedback */
.main-btn:active,
.chat-send-btn:active,
button:active {
  transform: scale(0.96);
}

.nav-link:active {
  opacity: 0.7;
}

/* Improve scrolling on iOS */
.chat-messages,
#winners-list {
  -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on interactive elements */
button,
.nav-link,
.main-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Responsive images and media */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Additional mobile breakpoints */
@media (max-width: 480px) {
  .hero h1 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }

  .jackpot-overview,
  .mega-highlight,
  .winner-box.highlight {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .nav-link.highlight {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Desktop optimization for larger screens */
@media (min-width: 1400px) {
  .pools {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  .pool-row,
  .winner-row {
    max-width: 1400px;
  }
}

/* === 🎵 Music Control Button === */
.music-control {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(43, 0, 0, 0.95), rgba(80, 0, 0, 0.95));
  border: 3px solid #FFD700;
  color: #FFD700;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s infinite;
}

.music-control:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
  background: linear-gradient(135deg, rgba(80, 0, 0, 0.95), rgba(120, 0, 0, 0.95));
}

.music-control:active {
  transform: scale(0.95);
}

.music-control.muted {
  opacity: 0.5;
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
  }
}

/* Mobile adjustment for music button */
@media (max-width: 768px) {
  .music-control {
    width: 50px;
    height: 50px;
    font-size: 24px;
    bottom: 15px;
    left: 15px;
  }
}


