:root{
  --teal:#00b8b8;
  --aqua:#6ff3e8;
  --deepTeal:#04777a;
  --coral:#ff6f61;
  --pink:#ff5da2;
  --sun:#ffd166;
  --orange:#ff9f1c;
  --sand:#ffe8b6;
  --cream:#fff8e7;
  --navy:#073b4c;
}

/* =====================================================
   1. THEME, RESET, AND PAGE BACKGROUND
===================================================== */

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

html{
  min-height:100%;
}

body{
  min-height:100svh;
  font-family:Arial,Helvetica,sans-serif;
  overflow:hidden;
  color:var(--navy);

  background:
    radial-gradient(circle at 50% 16%, rgba(255,209,102,.38), transparent 26%),
    radial-gradient(circle at 16% 72%, rgba(255,93,162,.25), transparent 34%),
    radial-gradient(circle at 84% 68%, rgba(0,184,184,.26), transparent 36%),
    linear-gradient(
      180deg,
      rgba(3,26,43,.70) 0%,
      rgba(9,67,81,.36) 38%,
      rgba(255,143,102,.34) 66%,
      rgba(255,218,188,.78) 100%
    ),
    url("/landingsub/bingomedia/DoofusBeachBackground.png");

  background-size:auto, auto, auto, auto, cover;
  background-position:center;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;

  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,.16) 43%, transparent 61%),
    radial-gradient(circle at center, rgba(255,248,231,.22), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 88px);

  opacity:.95;
  mix-blend-mode:screen;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:white;
  opacity:0;
  transition:opacity .7s ease;
  z-index:999;
}

body.white-flash::after{
  opacity:1;
}

/* =====================================================
   2. ENTRY PAGE LAYOUT AND GATE CARD
===================================================== */

.welcome-gate{
  position:relative;
  z-index:2;

  min-height:100svh;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:24px;
}

.welcome-gate::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  z-index:0;

  width:min(1120px,90vw);
  height:min(520px,62vh);

  transform:translate(-50%,-50%);

  border-radius:999px;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255,248,231,.24),
      rgba(255,209,102,.14) 34%,
      rgba(0,184,184,.08) 52%,
      transparent 74%
    );

  filter:blur(12px);
  pointer-events:none;

  animation:cabanaAura 6s ease-in-out infinite;
}

.welcome-gate::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-180px;
  width:900px;
  height:420px;
  transform:translateX(-50%);
  z-index:0;
  pointer-events:none;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255,209,102,.34),
      rgba(255,111,97,.22) 36%,
      transparent 68%
    );

  filter:blur(16px);
}

.entry-stack{
  position:relative;
  z-index:2;

  width:min(980px,100%);

  display:flex;
  flex-direction:column;
  align-items:center;
  gap:22px;
}

.gate-card{
  width:100%;
  position:relative;
  z-index:2;

  padding:28px 34px 34px;

  border-radius:38px;
  text-align:center;

  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.66), transparent 38%),
    linear-gradient(180deg, rgba(255,248,231,.84), rgba(255,232,182,.68));

  backdrop-filter:blur(24px) saturate(1.08);

  border:3px solid rgba(255,255,255,.62);

  box-shadow:
    0 50px 140px rgba(0,0,0,.42),
    0 0 70px rgba(255,209,102,.16),
    0 0 120px rgba(0,184,184,.10),
    inset 0 0 0 1px rgba(255,255,255,.30);

  overflow:hidden;
}

.gate-card::before{
  content:"";
  position:absolute;
  inset:14px;

  border-radius:26px;

  border:2px dashed rgba(255,111,97,.26);

  pointer-events:none;
}

.gate-card::after{
  content:"";
  position:absolute;
  inset:-40%;

  background:
    linear-gradient(
      115deg,
      transparent 35%,
      rgba(255,255,255,.16) 46%,
      transparent 57%
    );

  transform:translateX(-38%) rotate(4deg);
  animation:cardShine 8s ease-in-out infinite;
  pointer-events:none;
}

.gate-entering .gate-card{
  animation:gatePulse 1.8s ease-in-out infinite;
}

/* =====================================================
   3. LOGO, TITLE, AND ENTRY BUTTON
===================================================== */

.gate-logo{
  width:min(420px,88%);
  display:block;

  margin:0 auto -8px;

  filter:
    drop-shadow(0 20px 32px rgba(0,0,0,.32))
    drop-shadow(0 0 22px rgba(255,209,102,.18));

  animation:
    crestFloat 4s ease-in-out infinite,
    logoGlow 3.2s ease-in-out infinite;

  position:relative;
  z-index:2;
}

h1{
  position:relative;
  z-index:2;

  margin-top:8px;

  text-transform:uppercase;
  font-weight:950;
  letter-spacing:-.05em;
  line-height:.84;

  font-size:clamp(2.5rem,6vw,5.6rem);

  color:#06293a;

  transform:rotate(-.5deg);

  animation:titleParty 4.5s ease-in-out infinite;

  text-shadow:
    0 3px 0 #ffffff,
    0 7px 0 #ffd166,
    0 12px 0 rgba(255,111,97,.65),
    0 18px 30px rgba(0,0,0,.36),
    0 0 22px rgba(7,59,76,.28);
}

h1::before,
h1::after{
  content:"";

  position:absolute;

  left:50%;

  width:min(420px,82%);
  height:5px;

  border-radius:999px;

  transform:translateX(-50%);

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--teal),
      var(--sun),
      var(--coral),
      transparent
    );

  box-shadow:0 0 20px rgba(255,209,102,.55);

  animation:titleBarGlow 2.4s ease-in-out infinite;
}

h1::before{
  top:-16px;
}

h1::after{
  bottom:-18px;
}

h1 .welcome-word{
  display:block;

  color:#073b4c;

  font-size:clamp(1.2rem,3vw,2.4rem);

  letter-spacing:.22em;

  line-height:1.1;

  margin-bottom:10px;

  text-shadow:
    0 2px 0 #fff8e7,
    0 5px 0 rgba(255,209,102,.75),
    0 10px 18px rgba(0,0,0,.22);

  animation:welcomePop 2.8s ease-in-out infinite;
}

h1 span{
  display:block;

  color:#ffffff;

  -webkit-text-stroke:2px rgba(7,59,76,.65);

  background:none;

  filter:
    drop-shadow(0 5px 0 rgba(255,209,102,.9))
    drop-shadow(0 10px 0 rgba(255,111,97,.45))
    drop-shadow(0 18px 24px rgba(0,0,0,.42))
    drop-shadow(0 0 20px rgba(255,255,255,.55));

  animation:none;
}

.title-spark{
  display:inline-block;
  animation:sparkWiggle 1.8s ease-in-out infinite;
}

.button-row{
  position:relative;

  display:flex;
  align-items:center;
  justify-content:center;

  width:min(470px,80%);
  margin:0;

  z-index:20;
}

.declare-btn{
  position:relative;
  z-index:2;

  appearance:none;
  border:none;

  cursor:pointer;

  width:100%;
  min-height:66px;

  padding:0 34px;

  border-radius:999px;

  background:
    linear-gradient(
      90deg,
      var(--pink),
      var(--coral),
      var(--sun),
      var(--teal)
    );

  color:#06293a;

  text-transform:uppercase;

  letter-spacing:.11em;

  font-size:.86rem;
  font-weight:950;

  box-shadow:
    0 18px 42px rgba(0,0,0,.24),
    0 0 34px rgba(255,209,102,.30);

  transition:.18s ease;
}

.declare-btn:hover{
  transform:translateY(-3px) scale(1.02);
}

.declare-btn:active{
  transform:scale(.98);
}

.declare-btn:disabled{
  cursor:wait;
}

.sound-note{
  position:relative;
  z-index:2;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  width:min(340px,100%);
  min-height:66px;

  padding:0 18px;

  border-radius:999px;

  background:
    linear-gradient(
      90deg,
      rgba(255,93,162,.16),
      rgba(255,209,102,.2),
      rgba(0,184,184,.16)
    );

  border:2px solid rgba(255,255,255,.34);

  box-shadow:
    0 12px 28px rgba(0,0,0,.14),
    0 0 22px rgba(255,209,102,.18);

  color:#073b4c;

  font-size:.78rem;
  font-weight:950;

  letter-spacing:.08em;

  text-transform:uppercase;
  text-align:center;

  animation:soundPulse 2.8s ease-in-out infinite;
}

/* =====================================================
   4. TERMS MODAL AND SCROLLING CONTENT
===================================================== */

.bingo-terms-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:
    radial-gradient(circle at top, rgba(255,212,118,.22), transparent 42%),
    rgba(4,31,24,.82);
  backdrop-filter:blur(10px);
}

.bingo-terms-modal.show{
  display:flex;
}

.bingo-terms-card{
  position:relative;
  width:min(760px, 100%);
  max-height:88vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:28px;
  background:
    linear-gradient(180deg, rgba(255,250,235,.98), rgba(255,239,200,.98));
  border:3px solid rgba(255,191,80,.85);
  box-shadow:
    0 30px 90px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.7);
}

.bingo-terms-close{
  position:absolute;
  top:10px;
  right:14px;
  z-index:5;

  width:38px;
  height:38px;

  border:0;
  border-radius:999px;

  background:rgba(7,59,76,.12);
  color:#073b4c;

  font-size:1.55rem;
  font-weight:900;
  line-height:1;

  cursor:pointer;
}

.bingo-terms-close:hover{
  background:#ff6f61;
  color:#fff8e7;
}

.bingo-terms-header{
  padding:24px 54px 16px;
  text-align:center;
  background:
    linear-gradient(180deg, rgba(255,206,116,.9), rgba(255,244,211,.5));
  border-bottom:1px solid rgba(122,75,20,.14);
}

.bingo-terms-header h2{
  margin:0;
  color:#184d38;
  font-size:clamp(1.7rem,4vw,2.5rem);
  line-height:1;
}

.bingo-terms-header p{
  margin:10px 0 0;
  color:#6f4a19;
  font-weight:800;
}

.bingo-terms-scroll{
  overflow-y:auto;
  padding:24px 30px;
  color:#173e33;
  line-height:1.65;
}

.bingo-terms-scroll h3{
  margin:22px 0 8px;
  color:#0b5a43;
  font-size:1.12rem;
}

.bingo-terms-scroll p{
  margin:0 0 12px;
}

.bingo-terms-scroll ul{
  margin:0 0 16px;
  padding-left:22px;
}

.bingo-terms-scroll li{
  margin-bottom:8px;
}

.bingo-fun-line{
  margin-top:22px;
  padding:16px;
  border-radius:18px;
  background:rgba(255,204,92,.32);
  color:#6a3f10;
  font-weight:900;
  text-align:center;
}

.audio-preference{
  margin-top:14px;

  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.music-toggle{
  border:0;
  cursor:pointer;

  padding:10px 18px;

  border-radius:999px;

  font-size:.82rem;
  font-weight:900;
  letter-spacing:.05em;

  color:#184d38;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.9),
      rgba(255,248,224,.95)
    );

  box-shadow:
    0 6px 18px rgba(0,0,0,.08);

  transition:.25s ease;
}

.music-toggle:hover{
  transform:translateY(-1px);
}

.music-toggle.active{
  background:
    linear-gradient(
      180deg,
      #dff9ef,
      #bff2da
    );
}

.music-toggle.muted{
  background:
    linear-gradient(
      180deg,
      #f3f3f3,
      #dddddd
    );

  color:#666;
}

.audio-preference small{
  color:#6f4a19;
  font-weight:700;
}

.volume-control{
  width:min(340px,100%);

  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:8px 14px;

  border-radius:999px;

  background:rgba(255,255,255,.42);
  border:1px solid rgba(22,86,65,.12);
}

.volume-control input{
  width:100%;
  accent-color:#1f8f69;
  cursor:pointer;
}

/* =====================================================
   5. MODAL ACTIONS, LOADING BAR, AND AGREE BUTTON AND MUSIC
===================================================== */

.bingo-terms-actions{
  padding:18px 24px 24px;
  border-top:1px solid rgba(122,75,20,.14);
  background:rgba(255,248,224,.95);
}

.terms-loading-box{
  margin-bottom:16px;
  text-align:center;
}

.terms-loading-box.hidden{
  display:none;
}

.terms-loading-box p{
  margin:0 0 10px;
  color:#184d38;
  font-weight:900;
}

.terms-loading-track{
  height:14px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(22,86,65,.16);
  border:1px solid rgba(22,86,65,.2);
}

.terms-loading-bar{
  width:0%;
  height:100%;
  border-radius:999px;
  background:
    linear-gradient(
      90deg,
      #ff5da2,
      #ff6f61,
      #ffd166,
      #00b8b8,
      #6ff3e8,
      #ff5da2
    );
  background-size:300% 100%;
  transition:width .25s linear;
  animation:rainbowShift 2.4s linear infinite;
}

.agree-btn{
  width:100%;
  min-height:64px;

  border:0;
  border-radius:999px;

  background:
    linear-gradient(
      180deg,
      #1f8f69,
      #0d513e
    );

  color:#fff7df;

  font-size:1rem;
  font-weight:1000;

  letter-spacing:.08em;
  text-transform:uppercase;

  cursor:pointer;

  box-shadow:
    0 12px 28px rgba(9,80,60,.28);

  transition:
    background 1.8s ease,
    color 1.8s ease,
    transform .2s ease,
    opacity .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.agree-btn:hover:not(:disabled){
  transform:translateY(-2px);

  box-shadow:
    0 18px 38px rgba(9,80,60,.34);
}

.agree-btn:active:not(:disabled){
  transform:scale(.98);
}

.agree-btn:disabled{
  opacity:.45;
  cursor:not-allowed;

  filter:grayscale(.8);

  background:
    linear-gradient(
      180deg,
      #8f9a96,
      #5e6965
    );

  box-shadow:none;
}

.agree-btn.enabled{
  opacity:1;

  filter:none;

  background:
    linear-gradient(
      180deg,
      #1f8f69,
      #0d513e
    );

  animation:agreePulse 1.5s ease-in-out infinite;
}

.agree-btn.agree-fade-white{
  opacity:1;
  cursor:wait;

  color:#0d513e;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #fff8e7
    );

  filter:none;

  box-shadow:
    0 14px 34px rgba(255,248,231,.34),
    0 0 24px rgba(255,255,255,.45);

  animation:none;
}

.agree-btn.agree-loading{
  opacity:1;
  cursor:wait;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  color:#06293a;

  background:
    linear-gradient(
      90deg,
      #ff5da2,
      #ff6f61,
      #ffd166,
      #00b8b8,
      #6ff3e8,
      #ff5da2
    );

  background-size:300% 100%;

  filter:none;

  box-shadow:
    0 18px 44px rgba(0,0,0,.22),
    0 0 34px rgba(255,209,102,.34);

  animation:
    rainbowShift 2.6s linear infinite,
    loadingBounce 1.8s ease-in-out infinite;
}

.agree-btn.agree-loading::before{
  content:"";

  position:absolute;
  inset:0;

  background:
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(255,255,255,.38) 46%,
      transparent 72%
    );

  transform:translateX(-120%);
  animation:buttonShine 1.7s infinite;
}

.loading-text{
  position:relative;
  z-index:2;
}

.spinner-ring{
  position:relative;
  z-index:2;

  width:22px;
  height:22px;

  border-radius:50%;

  border:3px solid rgba(255,255,255,.36);
  border-top-color:#073b4c;

  animation:spinRing .7s linear infinite;

  flex:0 0 auto;
}


/* =====================================================
   6. BACK HOME BUTTON
===================================================== */

.back-home-btn{
  position:absolute;
  top:40px;
  left:50%;
  transform:translateX(-50%);

  display:inline-flex;
  align-items:center;
  gap:10px;

  padding:12px 22px;

  border-radius:999px;

  text-decoration:none;

  color:#fff8e7;

  font-size:.82rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.18),
      rgba(255,255,255,.08)
    );

  border:1px solid rgba(255,255,255,.25);

  backdrop-filter:blur(12px);

  box-shadow:
    0 12px 30px rgba(0,0,0,.18);

  transition:.2s ease;

  z-index:10;
}

.back-home-btn:hover{
  transform:
    translateX(-50%)
    translateY(-2px);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.24),
      rgba(255,255,255,.12)
    );

  box-shadow:
    0 18px 38px rgba(0,0,0,.24),
    0 0 20px rgba(255,209,102,.25);
}

.back-home-btn:active{
  transform:
    translateX(-50%)
    scale(.98);
}

/* =====================================================
   7. ANIMATIONS
===================================================== */

.zoom-away{
  animation:zoomPortal 1.1s ease-in forwards;
}

.confetti-bit{
  position:fixed;
  z-index:9999;

  width:14px;
  height:14px;

  border-radius:4px;

  pointer-events:none;

  animation:confettiFly linear forwards;
}

@keyframes agreePulse{
  0%{
    transform:scale(1);
  }

  50%{
    transform:scale(1.03);
  }

  100%{
    transform:scale(1);
  }
}

@keyframes cabanaAura{
  0%,100%{
    opacity:.72;
    transform:translate(-50%,-50%) scale(1);
  }

  50%{
    opacity:1;
    transform:translate(-50%,-50%) scale(1.04);
  }
}

@keyframes cardShine{
  0%,55%,100%{
    transform:translateX(-42%) rotate(4deg);
    opacity:0;
  }

  70%{
    opacity:1;
  }

  88%{
    transform:translateX(42%) rotate(4deg);
    opacity:0;
  }
}

@keyframes crestFloat{
  0%,100%{
    transform:
      translateY(0)
      rotate(-.4deg);
  }

  50%{
    transform:
      translateY(-7px)
      rotate(.4deg);
  }
}

@keyframes logoGlow{
  0%,100%{
    filter:
      drop-shadow(0 20px 32px rgba(0,0,0,.32))
      drop-shadow(0 0 18px rgba(255,209,102,.16));
  }

  50%{
    filter:
      drop-shadow(0 24px 40px rgba(0,0,0,.38))
      drop-shadow(0 0 34px rgba(255,209,102,.32));
  }
}

@keyframes titleParty{
  0%,100%{
    transform:
      rotate(-.5deg)
      translateY(0)
      scale(1);
  }

  50%{
    transform:
      rotate(.5deg)
      translateY(-4px)
      scale(1.015);
  }
}

@keyframes titleBarGlow{
  0%,100%{
    opacity:.68;
    transform:
      translateX(-50%)
      scaleX(.88);
  }

  50%{
    opacity:1;
    transform:
      translateX(-50%)
      scaleX(1.05);
  }
}

@keyframes welcomePop{
  0%,100%{
    transform:translateY(0);
  }

  50%{
    transform:translateY(-3px);
  }
}

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

  100%{
    background-position:220% 50%;
  }
}

@keyframes sparkWiggle{
  0%,100%{
    transform:
      rotate(-8deg)
      scale(1);
  }

  50%{
    transform:
      rotate(10deg)
      scale(1.15);
  }
}

@keyframes soundPulse{
  0%,100%{
    transform:scale(1);

    box-shadow:
      0 12px 28px rgba(0,0,0,.14),
      0 0 22px rgba(255,209,102,.18);
  }

  50%{
    transform:scale(1.03);

    box-shadow:
      0 18px 36px rgba(0,0,0,.2),
      0 0 34px rgba(255,209,102,.34);
  }
}

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

  100%{
    background-position:300% 50%;
  }
}

@keyframes loadingBounce{
  0%,100%{
    transform:translateY(0);
  }

  50%{
    transform:translateY(-4px);
  }
}

@keyframes buttonShine{
  0%{
    transform:translateX(-120%);
  }

  100%{
    transform:translateX(140%);
  }
}

@keyframes spinRing{
  to{
    transform:rotate(360deg);
  }
}

@keyframes gatePulse{
  0%,100%{
    transform:scale(1);
  }

  50%{
    transform:scale(1.012);
  }
}

@keyframes zoomPortal{
  0%{
    opacity:1;

    transform:
      scale(1)
      rotate(0deg);

    filter:blur(0);
  }

  100%{
    opacity:0;

    transform:
      scale(1.45)
      rotate(2deg);

    filter:blur(12px);
  }
}

@keyframes confettiFly{
  0%{
    opacity:1;

    transform:
      translate(0,0)
      rotate(0deg)
      scale(1);
  }

  100%{
    opacity:0;

    transform:
      translate(
        calc(-220px + (440px * var(--rand-x, .5))),
        calc(-320px + (640px * var(--rand-y, .5)))
      )
      rotate(720deg)
      scale(.4);
  }
}

/* =====================================================
   8. MOBILE RESPONSIVE STYLES
===================================================== */

@media(max-width:720px){

  body{
    overflow:auto;
  }

  .welcome-gate{
    padding:72px 18px 42px;
  }

  .entry-stack{
    gap:18px;
  }

  .gate-card{
    padding:24px 16px 24px;
    border-radius:26px;
  }

  .gate-card::before{
    inset:9px;
    border-radius:18px;
  }

  .gate-logo{
    width:min(320px,92%);
  }

  h1{
    font-size:clamp(2.1rem,12vw,4.4rem);
  }

  h1 .welcome-word{
    font-size:clamp(1rem,6vw,1.55rem);
  }

  h1::before{
    top:-12px;
  }

  h1::after{
    bottom:-14px;
  }

  .button-row{
    width:calc(100% - 40px);
  }

  .sound-note{
    width:100%;
    min-height:62px;
    padding:12px 16px;
    font-size:.68rem;
  }

  .declare-btn{
    width:100%;
    min-height:62px;
    padding:0 18px;
    font-size:.72rem;
    line-height:1.3;
  }

  .back-home-btn{
    top:16px;
    padding:10px 18px;
    font-size:.68rem;
    letter-spacing:.08em;
  }
}

@media(max-width:560px){

  .bingo-terms-card{
    max-height:92vh;
    border-radius:22px;
  }

  .bingo-terms-scroll{
    padding:20px;
  }

  .agree-btn{
    font-size:.82rem;
    letter-spacing:.05em;
  }
}