/*-------------------------------------------Background & Layout---------------------------------------------*/
html {
  scroll-behavior: smooth;
}

html, body {
  background-color: #030712 !important;
  background-image: 
    radial-gradient(circle at 50% 0%, #0a1931 0%, #030712 65%),
    radial-gradient(circle at 10% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow-x: hidden;
}

/* Luxury Section Spacing & Dividers */
.luxury-section-pad {
  padding-top: 40px;
  padding-bottom: 40px;
  position: relative;
}

.luxury-section-pad::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
}

.luxury-footer-wrapper {
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(2, 4, 8, 0.9));
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

/* Luxury Sub-Headers & Badges */
.luxury-header-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #f3e5ab;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(138, 108, 28, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.08);
}

/* Global Titles */
.section-title {
  color: #ffffff !important;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 8px;
  letter-spacing: 0.8px;
}

.section-subtitle {
  color: #94a3b8 !important;
  text-align: center;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  margin-bottom: 30px;
  font-weight: 400;
}

/*-------------------------------------------Hero Section (Elite Framing)---------------------------------------------*/
section.position-relative {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.luxury-hero-wrapper {
  position: relative;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: #02050b;
}

.hero-ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 250px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

#bg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.main-title {
  z-index: 3;
}

.redirect-btn { 
  top: 68%;
  z-index: 3;
}

.redirect-btn img { 
    width: clamp(210px, 55%, 290px); 
    animation: luxury-pulse 2s infinite ease-in-out; 
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.8));
}

/*-------------------------------------------Elite Luxury Slot Machine UI---------------------------------------------*/
:root {
    --gold-light: #fff3cc;
    --gold-mid: #d4af37;
    --gold-dark: #8a6c1c;
    --gold-deep: #4a3508;
}

/* 3D Metallic Extrusion Typography */
.luxury-text-3d {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-mid) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1.5px;
    filter: drop-shadow(0px 3px 2px rgba(0,0,0,0.9)) drop-shadow(0px 1px 0px rgba(255,255,255,0.3));
    text-align: center;
}

/* Six-Figure Glassmorphic Module */
.slot-machine {
    background: linear-gradient(145deg, rgba(13, 20, 33, 0.88), rgba(4, 7, 14, 0.96));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 24px;
    padding: 30px 22px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 10px rgba(0, 0, 0, 0.9);
    width: 95%;
    max-width: 440px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.slot-machine-glow-border {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    pointer-events: none;
}

.reels-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    background: #010204;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: inset 0 8px 20px rgba(0,0,0,0.95), 0 2px 5px rgba(0,0,0,0.5);
}

.reel {
    width: 31%;
    height: 95px;
    background: linear-gradient(180deg, #070a12 0%, #0f1622 50%, #070a12 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    overflow: hidden;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.3);
}

/* High-End 3D Gold Button */
.spin-btn, .cta-btn {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-mid) 45%, var(--gold-dark) 100%);
    color: #120c02;
    border: 1px solid #ffea99;
    padding: 16px 24px;
    font-size: clamp(0.95rem, 3.5vw, 1.15rem);
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    box-shadow: 
        0 6px 0 var(--gold-deep), 
        0 12px 25px rgba(0,0,0,0.7),
        inset 0 1px 1px rgba(255,255,255,0.6);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    transition: all 0.08s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.spin-btn small {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
    text-shadow: none;
}

.spin-btn:active, .cta-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 var(--gold-deep), 
        0 6px 12px rgba(0,0,0,0.7),
        inset 0 1px 1px rgba(255,255,255,0.4);
}

.cta-btn {
    display: none;
    margin-top: 15px;
    text-decoration: none;
    text-align: center;
    animation: luxury-pulse 1.8s infinite ease-in-out;
}

.status-text {
    margin-top: 18px;
    font-size: 1rem;
    color: #cbd5e1;
    min-height: 24px;
    font-weight: 500;
}

.jackpot-glow {
    animation: luxury-win-glow 1.5s ease-in-out infinite alternate;
}

@keyframes luxury-win-glow {
    from { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.1); 
        border-color: var(--gold-mid);
    }
    to { 
        box-shadow: 0 0 50px rgba(255, 243, 204, 0.7), inset 0 0 40px rgba(255, 243, 204, 0.3); 
        border-color: var(--gold-light);
    }
}

/*-------------------------------------------Video Section (Elite Frame)---------------------------------------------*/
#video-section { 
    display: flex; 
    justify-content: center; 
}

.video-frame {
  width: min(92vw, 390px);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 30px rgba(212, 175, 55, 0.1);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  margin: 0 auto;
  background: #000;
  position: relative;
}

.video-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}

.video-el { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
  position: relative;
  z-index: 1;
}

/*-------------------------------------------Animations---------------------------------------------*/
@keyframes luxury-pulse { 
    0%, 100% { transform: scale(1); filter: drop-shadow(0 15px 30px rgba(0,0,0,0.8)); } 
    50% { transform: scale(1.03); filter: drop-shadow(0 20px 35px rgba(212,175,55,0.35)); } 
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Desktop Height Adjustment --- */
@media (min-width: 992px) {
  section.position-relative {
    height: 100vh;
    width: auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
  }
  #bg {
    height: 100%; 
    width: auto;  
    max-width: none; 
    object-fit: contain;
  }
  .main-title { top: 15%; }
  .redirect-btn { top: 68%;}
}

/* --- Mobile Optimization --- */
@media (max-width: 991px) {
  #bg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }
}

/*-------------------------------------------Treasure Chest Mini-Game Additions---------------------------------------------*/
/* These styles are scoped to the existing game section to avoid affecting other page sections. */
#game-section .language-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -10px 0 18px;
}

#game-section .language-btn {
  min-width: 88px;
  padding: 8px 15px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 999px;
  background: rgba(7, 12, 22, 0.9);
  color: #f3e5ab;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#game-section .language-btn.is-active,
#game-section .language-btn:hover {
  color: #120c02;
  border-color: #fff0a6;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-mid));
}

#game-section .treasure-game {
  padding: 24px 22px 28px;
}

#game-section .treasure-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.13) 0%, rgba(1, 2, 4, 0.1) 68%);
}

#game-section .treasure-chest {
  position: relative;
  z-index: 2;
  display: block;
  width: 150px;
  height: 125px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 13px 16px rgba(0, 0, 0, 0.65));
  -webkit-tap-highlight-color: transparent;
}

#game-section .treasure-chest:disabled { cursor: default; }

#game-section .chest-lid {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 120px;
  height: 43px;
  border: 2px solid #ffdf78;
  border-radius: 42px 42px 7px 7px;
  background: linear-gradient(180deg, #f7cf58 0%, #a96712 42%, #63330b 100%);
  box-shadow: inset 0 5px 0 rgba(255, 244, 180, 0.35), inset 0 -5px 0 rgba(54, 25, 2, 0.55);
  transform-origin: 10% 100%;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1), top 0.55s ease;
}

#game-section .chest-lid-trim {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 5px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #7d490c, #fff0a6, #8e510e);
}

#game-section .chest-body {
  position: absolute;
  top: 54px;
  left: 13px;
  width: 124px;
  height: 62px;
  border: 2px solid #ffdf78;
  border-radius: 5px 5px 13px 13px;
  background: linear-gradient(100deg, #7a3e0c 0%, #d28b20 22%, #8b4b0b 48%, #e6a82d 72%, #6d3508 100%);
  box-shadow: inset 0 5px 0 rgba(255, 230, 130, 0.35), inset 0 -8px 0 rgba(49, 20, 0, 0.35);
}

#game-section .chest-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  border-right: 2px solid #ffe99a;
  border-left: 2px solid #ffe99a;
  background: linear-gradient(90deg, #80500c, #f8d96b, #94600d);
}

#game-section .chest-lock {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 25px;
  height: 28px;
  place-items: center;
  transform: translateX(-50%);
  border: 2px solid #fff0a6;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff0a6, #c18b20);
  color: #63330b;
  font-size: 12px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

#game-section .chest-shadow {
  position: absolute;
  z-index: -1;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  filter: blur(5px);
}

#game-section .treasure-hint {
  margin: 2px 0 20px;
  color: #e8cf8b;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

#game-section .treasure-spark {
  position: absolute;
  color: #ffe78b;
  text-shadow: 0 0 14px rgba(255, 210, 72, 0.9);
  animation: treasure-float 2.4s ease-in-out infinite;
  pointer-events: none;
}
#game-section .treasure-spark-one { top: 23px; left: 19%; font-size: 22px; }
#game-section .treasure-spark-two { top: 48px; right: 18%; font-size: 28px; animation-delay: .4s; }
#game-section .treasure-spark-three { bottom: 22px; right: 25%; font-size: 18px; animation-delay: .8s; }

#game-section .chest-shake { animation: treasure-shake 0.65s ease-in-out; }
#game-section .chest-open .chest-lid { top: 0; transform: translate(-3px, -24px) rotate(-24deg); }
#game-section .chest-open .chest-body { box-shadow: inset 0 5px 0 rgba(255, 230, 130, 0.35), 0 -18px 35px rgba(255, 198, 45, 0.35); }
#game-section .chest-open .treasure-scene { background: radial-gradient(ellipse at center, rgba(255, 202, 52, 0.24), rgba(1, 2, 4, 0.1) 72%); }
#game-section .chest-open .treasure-spark { animation-duration: 0.8s; }

@keyframes treasure-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-6px) rotate(-3deg); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(4px) rotate(2deg); }
}

@keyframes treasure-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: .65; }
  50% { transform: translateY(-9px) scale(1.16); opacity: 1; }
}

@media (max-width: 420px) {
  #game-section .treasure-game { padding: 22px 14px 25px; }
  #game-section .treasure-scene { min-height: 175px; }
  #game-section .treasure-chest { transform: scale(.92); }
  #game-section .language-btn { min-width: 82px; }
}
