:root {
  --deep: #041e33;
  --ocean: #0a3d5c;
  --sea: #127a9e;
  --foam: #7fd4f0;
  --coral: #ff8f6b;
  --sand: #e8f7ff;
}

* { box-sizing: border-box; }

body.etw-updating {
  margin: 0;
  min-height: 100vh;
  font-family: Ubuntu, system-ui, sans-serif;
  color: var(--sand);
  background: linear-gradient(180deg, var(--deep) 0%, var(--ocean) 35%, var(--sea) 72%, #1a9ec4 100%);
  overflow-x: hidden;
}

.etw-updating-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Sunlight rays from above */
.etw-light-ray {
  position: absolute;
  top: -10%;
  width: 120px;
  height: 130%;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.04) 40%, transparent 100%);
  transform-origin: top center;
  filter: blur(8px);
  animation: etw-ray-shimmer 8s ease-in-out infinite;
}

.etw-light-ray-1 { left: 15%; transform: rotate(-8deg); animation-delay: 0s; }
.etw-light-ray-2 { left: 48%; width: 160px; transform: rotate(2deg); animation-delay: 2s; opacity: .85; }
.etw-light-ray-3 { right: 12%; transform: rotate(10deg); animation-delay: 4s; }

@keyframes etw-ray-shimmer {
  0%, 100% { opacity: .5; }
  50% { opacity: .9; }
}

/* Shimmering water caustics */
.etw-caustics {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(127,212,240,.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 75% 60%, rgba(127,212,240,.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 90%, rgba(255,255,255,.05) 0%, transparent 45%);
  animation: etw-caustics-shift 12s ease-in-out infinite;
}

@keyframes etw-caustics-shift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .7; }
  33% { transform: translate(2%, -1%) scale(1.02); opacity: 1; }
  66% { transform: translate(-2%, 1%) scale(.98); opacity: .8; }
}

/* Kelp / seaweed at bottom */
.etw-kelp {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 45vh;
  max-height: 320px;
  background: linear-gradient(180deg, transparent 0%, rgba(20,120,80,.35) 15%, rgba(15,90,60,.5) 100%);
  border-radius: 50% 50% 0 0 / 20% 20% 0 0;
  transform-origin: bottom center;
  filter: blur(.5px);
}

.etw-kelp::before,
.etw-kelp::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70%;
  background: inherit;
  border-radius: inherit;
}

.etw-kelp::before { left: -60%; transform: rotate(-12deg); opacity: .7; height: 55%; }
.etw-kelp::after { right: -55%; transform: rotate(14deg); opacity: .6; height: 62%; }

.etw-kelp-1 { left: 3%; animation: etw-kelp-sway 6s ease-in-out infinite; height: 38vh; }
.etw-kelp-2 { left: 12%; animation: etw-kelp-sway 7.5s ease-in-out infinite .8s; height: 52vh; opacity: .85; }
.etw-kelp-3 { right: 8%; animation: etw-kelp-sway 6.5s ease-in-out infinite 1.2s; height: 44vh; }
.etw-kelp-4 { right: 18%; animation: etw-kelp-sway 8s ease-in-out infinite .4s; height: 35vh; opacity: .75; }
.etw-kelp-5 { left: 42%; animation: etw-kelp-sway 7s ease-in-out infinite 2s; height: 28vh; opacity: .5; width: 22px; }

@keyframes etw-kelp-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

/* Rising bubbles */
.etw-bubble {
  position: absolute;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.2);
  animation: etw-rise linear infinite;
}

.etw-bubble-1  { left: 5%;  width: 14px; height: 14px; animation-duration: 9s;  animation-delay: 0s; }
.etw-bubble-2  { left: 14%; width: 22px; height: 22px; animation-duration: 12s; animation-delay: 1.5s; }
.etw-bubble-3  { left: 24%; width: 10px; height: 10px; animation-duration: 7s;  animation-delay: .3s; }
.etw-bubble-4  { left: 33%; width: 30px; height: 30px; animation-duration: 14s; animation-delay: 3s; }
.etw-bubble-5  { left: 42%; width: 16px; height: 16px; animation-duration: 10s; animation-delay: .8s; }
.etw-bubble-6  { left: 51%; width: 24px; height: 24px; animation-duration: 11s; animation-delay: 2.2s; }
.etw-bubble-7  { left: 58%; width: 12px; height: 12px; animation-duration: 8s;  animation-delay: 4s; }
.etw-bubble-8  { left: 66%; width: 28px; height: 28px; animation-duration: 13s; animation-delay: 1s; }
.etw-bubble-9  { left: 74%; width: 18px; height: 18px; animation-duration: 9.5s; animation-delay: 2.8s; }
.etw-bubble-10 { left: 82%; width: 20px; height: 20px; animation-duration: 10.5s; animation-delay: .5s; }
.etw-bubble-11 { left: 91%; width: 15px; height: 15px; animation-duration: 8.5s; animation-delay: 3.5s; }
.etw-bubble-12 { left: 96%; width: 26px; height: 26px; animation-duration: 15s; animation-delay: 5s; }

@keyframes etw-rise {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  8% { opacity: .75; }
  50% { transform: translateY(-55vh) translateX(8px) scale(1.05); }
  100% { transform: translateY(-115vh) translateX(-6px) scale(1.12); opacity: 0; }
}

/* Drifting sea icons */
.etw-sea-float {
  position: absolute;
  font-size: 1.5rem;
  opacity: .28;
  animation: etw-drift 16s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}

.etw-float-1  { top: 12%; left: 8%;  animation-delay: 0s;   font-size: 1.4rem; }
.etw-float-2  { top: 22%; right: 10%; animation-delay: 3s;  font-size: 2rem; }
.etw-float-3  { top: 38%; left: 4%;  animation-delay: 1s;   font-size: 1.2rem; opacity: .2; }
.etw-float-4  { top: 48%; right: 6%; animation-delay: 5s;   font-size: 1.6rem; }
.etw-float-5  { top: 62%; left: 10%; animation-delay: 2s;  font-size: 1.8rem; }
.etw-float-6  { top: 72%; right: 14%; animation-delay: 4s; font-size: 1.3rem; }
.etw-float-7  { top: 18%; left: 38%; animation-delay: 6s; font-size: 1.5rem; opacity: .18; }
.etw-float-8  { top: 55%; right: 22%; animation-delay: 1.5s; font-size: 1.1rem; opacity: .22; }
.etw-float-9  { top: 30%; right: 28%; animation-delay: 7s; font-size: 1.7rem; opacity: .24; }
.etw-float-10 { top: 65%; left: 22%; animation-delay: 3.5s; font-size: 1.35rem; opacity: .2; }

@keyframes etw-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(12px, -8px) rotate(5deg); }
  50% { transform: translate(20px, -14px) rotate(-4deg); }
  75% { transform: translate(8px, -6px) rotate(3deg); }
}

/* Fish swimming horizontally */
.etw-fish-swim {
  position: absolute;
  left: -5%;
  font-size: 1.8rem;
  opacity: .32;
  animation: etw-swim linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
  will-change: transform;
}

.etw-fish-swim-1 { top: 25%; animation-duration: 22s; animation-delay: 0s; }
.etw-fish-swim-2 { top: 45%; animation-duration: 28s; animation-delay: 8s; font-size: 1.4rem; opacity: .25; }
.etw-fish-swim-3 { top: 68%; animation-duration: 25s; animation-delay: 14s; font-size: 1.6rem; }

@keyframes etw-swim {
  0% { transform: translateX(0) scaleX(1); }
  49% { transform: translateX(calc(100vw + 10%)) scaleX(1); }
  50% { transform: translateX(calc(100vw + 10%)) scaleX(-1); }
  100% { transform: translateX(0) scaleX(-1); }
}

/* Surface waves at bottom */
.etw-wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath fill='rgba(255,255,255,0.06)' d='M0,40 C150,80 350,0 600,40 C850,80 1050,0 1200,40 L1200,80 L0,80 Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 80px;
  opacity: .9;
}

.etw-wave-1 {
  bottom: 0;
  animation: etw-wave-move 14s linear infinite;
}

.etw-wave-2 {
  bottom: 12px;
  opacity: .45;
  animation: etw-wave-move 20s linear infinite reverse;
  filter: blur(1px);
}

@keyframes etw-wave-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-600px); }
}

.etw-updating-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}

.etw-updating-card {
  width: min(720px, 100%);
  text-align: center;
  padding: clamp(28px, 5vw, 44px);
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.06) 100%);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.15);
}

.etw-updating-logo {
  width: min(260px, 72vw);
  height: auto;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.3));
  margin-bottom: 20px;
}

.etw-updating-steve {
  width: min(200px, 50vw);
  height: auto;
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.35));
  animation: etw-steve-bob 4s ease-in-out infinite;
}

@keyframes etw-steve-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.etw-countdown {
  margin: 0 0 24px;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .18);
}

.etw-countdown-label {
  margin: 0 0 12px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .9;
}

.etw-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.etw-countdown-unit {
  padding: 12px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
}

.etw-countdown-unit strong {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
}

.etw-countdown-unit span {
  display: block;
  margin-top: 4px;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .8;
}

.etw-countdown-when {
  margin: 14px 0 0;
  font-size: .88rem;
  opacity: .85;
}

.etw-countdown-done {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
}

.etw-updating-body {
  text-align: left;
  font-size: clamp(1rem, 2.2vw, 1.08rem);
  line-height: 1.65;
}

.etw-updating-body p {
  margin: 0 0 16px;
}

.etw-updating-body strong {
  color: #fff;
}

.etw-updating-thanks {
  margin-top: 8px !important;
  text-align: center;
  font-weight: 500;
}

.etw-updating-footer {
  margin-top: 28px;
  text-align: center;
  opacity: .92;
}

.etw-updating-school {
  font-weight: 700;
  font-size: 1.05rem;
}

.etw-updating-address {
  margin-top: 6px;
  font-size: .92rem;
  opacity: .85;
}

@media (max-width: 560px) {
  .etw-updating-card { padding: 24px 18px; border-radius: 18px; }
  .etw-updating-body { text-align: center; }
  .etw-kelp { opacity: .6; }
  .etw-fish-swim { font-size: 1.3rem; }
  .etw-countdown-grid { gap: 6px; }
  .etw-countdown-unit { padding: 10px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .etw-bubble, .etw-sea-float, .etw-kelp, .etw-wave,
  .etw-light-ray, .etw-caustics, .etw-updating-steve {
    animation: none !important;
  }
  .etw-fish-swim {
    animation: none !important;
  }
  .etw-fish-swim-1 { left: 12%; transform: none; }
  .etw-fish-swim-2 { left: 48%; transform: none; }
  .etw-fish-swim-3 { left: 78%; transform: none; }
  .etw-jukebox-vinyl.is-spinning { animation: none !important; }
  .etw-jukebox-eq.is-live span { animation: none !important; height: 30% !important; }
}

/* ── Steve jukebox pop-out ── */
.etw-steve-jukebox {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  pointer-events: none;
}

.etw-steve-jukebox * { pointer-events: auto; }

.etw-jukebox-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 12px 10px 14px;
  border: none;
  border-radius: 0 16px 16px 0;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6b9d 0%, #c9184a 55%, #9d174d 100%);
  color: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: etw-jukebox-wiggle 4s ease-in-out infinite;
}

.etw-jukebox-tab:hover {
  transform: translateX(4px);
  box-shadow: 8px 0 28px rgba(0, 0, 0, .4);
}

.etw-steve-jukebox.is-open .etw-jukebox-tab {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

@keyframes etw-jukebox-wiggle {
  0%, 100% { transform: rotate(0deg); }
  92% { transform: rotate(0deg); }
  94% { transform: rotate(-2deg); }
  96% { transform: rotate(2deg); }
  98% { transform: rotate(-1deg); }
}

.etw-jukebox-tab-bubble {
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 1.1rem;
  animation: etw-jukebox-note 2s ease-in-out infinite;
}

@keyframes etw-jukebox-note {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
  50% { transform: translateY(-6px) rotate(12deg); opacity: .85; }
}

.etw-jukebox-tab-steve {
  width: 52px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3));
}

.etw-jukebox-tab-label {
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  letter-spacing: .02em;
}

.etw-jukebox-tab-label em {
  font-style: normal;
  font-size: .85rem;
  color: #ffe066;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.etw-jukebox-panel {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-110%, -50%);
  width: min(280px, calc(100vw - 32px));
  padding: 20px 18px 18px;
  border-radius: 0 20px 20px 0;
  background: linear-gradient(165deg, rgba(255, 255, 255, .16) 0%, rgba(10, 61, 92, .85) 100%);
  border: 1px solid rgba(255, 255, 255, .22);
  border-left: none;
  backdrop-filter: blur(14px);
  box-shadow: 8px 0 40px rgba(0, 0, 0, .4);
  text-align: center;
  transition: transform .35s cubic-bezier(.34, 1.2, .64, 1);
}

.etw-steve-jukebox.is-open .etw-jukebox-panel {
  transform: translate(0, -50%);
}

.etw-jukebox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.etw-jukebox-vinyl-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.etw-jukebox-vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #111 0 18%, transparent 19%),
    repeating-radial-gradient(circle at center, #1a1a1a 0 2px, #0d0d0d 2px 4px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
}

.etw-jukebox-vinyl.is-spinning {
  animation: etw-vinyl-spin 2.8s linear infinite;
}

@keyframes etw-vinyl-spin {
  to { transform: rotate(360deg); }
}

.etw-jukebox-face {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: auto;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

.etw-steve-jukebox.is-playing .etw-jukebox-face {
  animation: etw-steve-bob 1s ease-in-out infinite;
}

.etw-jukebox-kicker {
  margin: 0;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .8;
}

.etw-jukebox-title {
  margin: 4px 0 2px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.etw-jukebox-sub {
  margin: 0 0 14px;
  font-size: .88rem;
  opacity: .9;
}

.etw-jukebox-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 28px;
  margin-bottom: 14px;
  opacity: .35;
  transition: opacity .2s;
}

.etw-jukebox-eq.is-live {
  opacity: 1;
}

.etw-jukebox-eq span {
  display: block;
  width: 5px;
  height: 30%;
  border-radius: 3px;
  background: linear-gradient(180deg, #7fd4f0, #ff6b9d);
}

.etw-jukebox-eq.is-live span {
  animation: etw-eq-bar .6s ease-in-out infinite alternate;
}

.etw-jukebox-eq span:nth-child(1) { animation-delay: 0s; }
.etw-jukebox-eq span:nth-child(2) { animation-delay: .1s; }
.etw-jukebox-eq span:nth-child(3) { animation-delay: .2s; }
.etw-jukebox-eq span:nth-child(4) { animation-delay: .15s; }
.etw-jukebox-eq span:nth-child(5) { animation-delay: .25s; }
.etw-jukebox-eq span:nth-child(6) { animation-delay: .08s; }
.etw-jukebox-eq span:nth-child(7) { animation-delay: .18s; }

@keyframes etw-eq-bar {
  from { height: 20%; }
  to { height: 100%; }
}

.etw-jukebox-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9d, #c9184a);
  box-shadow: 0 6px 20px rgba(201, 24, 74, .45);
  transition: transform .15s, box-shadow .15s;
}

.etw-jukebox-play:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(201, 24, 74, .55);
}

.etw-jukebox-play-icon {
  font-size: 1rem;
}

.etw-jukebox-hint {
  margin: 10px 0 0;
  font-size: .75rem;
  opacity: .75;
}

@media (max-width: 560px) {
  .etw-steve-jukebox { top: auto; bottom: 16px; transform: none; }
  .etw-jukebox-tab { flex-direction: row; border-radius: 16px 16px 16px 0; padding: 10px 14px; }
  .etw-jukebox-tab-steve { width: 40px; }
  .etw-jukebox-tab-label { text-align: left; font-size: .68rem; }
  .etw-jukebox-panel {
    bottom: 0;
    top: auto;
    transform: translateY(110%);
    width: min(320px, calc(100vw - 24px));
    border-radius: 20px 20px 0 0;
    border-left: 1px solid rgba(255, 255, 255, .22);
  }
  .etw-steve-jukebox.is-open .etw-jukebox-panel {
    transform: translateY(0);
  }
}
