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

:root {
  --red:         #E53935;
  --red-light:   #FF6F61;
  --pink:        #FF8FAB;
  --pink-light:  #FFD1DC;
  --orange:      #FF9F43;
  --white:       #FFFFFF;
  --text:        #3D2C2C;
  --text-light:  #7A6060;
  --shadow-col:  rgba(229,57,53,0.15);
  --shadow-soft: rgba(0,0,0,0.08);
  --font-fun:    'Fredoka', 'Nunito', sans-serif;
  --font-body:   'Nunito', sans-serif;
  --radius:      20px;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --phone-w:     clamp(220px, 45vw, 380px);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #1a0a2e;
  color: var(--text);
  font-family: var(--font-body);
}

/* ── SECTIONS ─────────────────────────────── */
section {
  position: fixed; inset: 0;
  opacity: 0; visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.7s var(--ease-out), visibility 0.7s, transform 0.7s var(--ease-out);
  pointer-events: none; z-index: 1;
  overflow: hidden;
}
section.active { opacity: 1; visibility: visible; transform: scale(1); pointer-events: auto; }
section.zoom-out { transform: scale(0.6) rotate(-5deg); opacity: 0; filter: blur(10px); transition: all 0.8s var(--ease-out); }

/* ── SHARED CENTER LAYOUT ─────────────────── */
.page-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: safe center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  overflow-y: auto;
}

/* ── PHONE FRAME ─────────────────────────── */
.phone-frame {
  position: relative;
  width: min(var(--phone-w), calc(50vh * 9 / 16));
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #222;
  box-shadow: 0 12px 40px rgba(255,110,199,0.3), 0 4px 15px rgba(0,0,0,0.3), 0 0 60px rgba(255,60,172,0.15);
  border: 4px solid rgba(255,255,255,0.9);
  flex-shrink: 1;
}
.phone-frame video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ── LANDING ──────────────────────────────── */
#landing {
  z-index: 10;
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1155 30%, #4a1a6b 60%, #1a0a2e 100%);
  overflow: hidden;
}

/* Disco lights */
.disco-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.disco-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
  animation: discoFloat 6s ease-in-out infinite alternate;
}
.disco-light:nth-child(1) { width: 300px; height: 300px; background: #ff00ff; top: -10%; left: 10%; animation-delay: 0s; }
.disco-light:nth-child(2) { width: 250px; height: 250px; background: #00ffff; top: 20%; right: -5%; animation-delay: 1.5s; }
.disco-light:nth-child(3) { width: 200px; height: 200px; background: #ff6ec7; bottom: 10%; left: 30%; animation-delay: 3s; }
.disco-light:nth-child(4) { width: 280px; height: 280px; background: #7b2ff7; bottom: -5%; right: 20%; animation-delay: 0.8s; }

@keyframes discoFloat {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.2; }
  100% { transform: translate(30px, -20px) scale(1.2); opacity: 0.35; }
}

/* Bouncing 57 balloon */
#balloon57 {
  position: absolute; z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
}
#balloon57 canvas {
  display: block;
}

#confetti-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}

/* mosaic inside the phone frame */
#mosaic {
  position: absolute; inset: 0;
  z-index: 2;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
}
.mosaic-tile {
  background-size: cover; background-position: center;
  transition: transform 0.9s var(--ease-out), opacity 0.7s ease;
  will-change: transform, opacity;
}

/* title */
.big-title { display: flex; flex-direction: column; line-height: 1.05; text-align: center; }
.title-line {
  font-family: var(--font-fun); font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,110,199,0.6), 3px 3px 0 rgba(255,60,172,0.3);
  opacity: 0; transform: translateY(30px) rotate(-2deg);
  animation: popIn 0.7s var(--ease-bounce) forwards;
}
.title-line:nth-child(1) { font-size: clamp(1.6rem, 5vw, 3.5rem); animation-delay: 0.2s; }
.title-line.t2 { font-size: clamp(1.3rem, 4vw, 2.5rem); animation-delay: 0.4s; color: #ff9ff3; }

@keyframes popIn {
  0%   { opacity: 0; transform: translateY(30px) rotate(-2deg) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

.name-title {
  font-family: var(--font-fun);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700; color: #FFD700;
  text-shadow: 0 0 25px rgba(255,215,0,0.5), 3px 4px 0 rgba(255,159,67,0.3);
  line-height: 1;
  opacity: 0;
  animation: popIn 0.7s 0.6s var(--ease-bounce) forwards;
}

#dance-video { z-index: 1; }

/* ── BUTTONS ──────────────────────────────── */
.btn-fun {
  font-family: var(--font-fun);
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 600;
  padding: 0.8em 1.8em;
  border: none; border-radius: 100px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5em;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.3s;
  opacity: 0; animation: popIn 0.6s 0.9s var(--ease-bounce) forwards;
  flex-shrink: 0;
}
.btn-fun:hover { transform: scale(1.06) translateY(-2px); }
.btn-fun:active { transform: scale(0.97); }

.btn-gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #1a0a2e; box-shadow: 0 6px 25px rgba(255,215,0,0.5); font-weight: 700; }
.btn-gold:hover { box-shadow: 0 10px 35px rgba(255,215,0,0.7); }

.btn-pink { background: linear-gradient(135deg, #ff6ec7, #ff3cac); color: #fff; box-shadow: 0 6px 25px rgba(255,60,172,0.5), 0 0 30px rgba(255,110,199,0.25); max-width: 500px; text-align: center; line-height: 1.4; animation-delay: 0.6s; font-weight: 700; }
.btn-pink:hover { box-shadow: 0 10px 35px rgba(255,60,172,0.7), 0 0 40px rgba(255,110,199,0.4); }

.btn-floating {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 45; opacity: 1; animation: none;
}
.btn-floating:hover { transform: translateX(-50%) scale(1.06) translateY(-2px); }

/* ── PHASE 2 ──────────────────────────────── */
#phase2 { z-index: 12; background: linear-gradient(160deg, #1a0a2e, #2d1155, #1a0a2e); }

.phase2-title {
  font-family: var(--font-fun);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 600; color: #ff9ff3;
  text-align: center;
  text-shadow: 0 0 15px rgba(255,159,243,0.3);
  opacity: 0; animation: popIn 0.6s 0.2s var(--ease-bounce) forwards;
}

/* ── NAV ──────────────────────────────────── */
#topnav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(10,10,30,0.6);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  z-index: 50;
}
.nav-brand { font-family: var(--font-fun); font-size: 1.4rem; font-weight: 700; color: #fff; }

.panel-toggle-btn {
  font-family: var(--font-fun); font-size: 0.85rem; font-weight: 600;
  background: linear-gradient(135deg, #FFD700, #FFA500); color: #1a0a2e;
  border: none; border-radius: 100px; padding: 0.5em 1.3em; cursor: pointer;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}
.panel-toggle-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255,215,0,0.5); }

/* ── GLOBE ────────────────────────────────── */
#globe-section { z-index: 5; background: #080820; }
#globe-container { width: 100%; height: 100%; }

/* Fake planets */
.fake-planet {
  position: absolute; z-index: 2; pointer-events: none;
}
.planet-left { top: 10%; left: 2%; }
.planet-right { bottom: 10%; left: 8%; }

/* ── SIDE PANEL ──────────────────────────── */
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px;
  background: rgba(8,8,32,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,0.06);
  z-index: 55;
  overflow: hidden;
}
.side-panel.closed { right: -430px; }

.side-panel-header {
  position: sticky; top: 0; z-index: 2;
  padding: 1rem 1.5rem;
  background: rgba(8,8,32,0.98);
  border-bottom: 1px solid rgba(255,215,0,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.side-panel-header h3 {
  font-family: var(--font-fun); font-size: 1.1rem; font-weight: 700; color: #FFD700;
}
.sp-close-btn {
  background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.5rem;
  cursor: pointer; padding: 0.2em; line-height: 1;
  transition: color 0.2s;
}
.sp-close-btn:hover { color: #fff; }

.side-panel-inner {
  padding: 0.5rem 1.5rem 2rem;
  height: calc(100% - 60px); overflow-y: auto;
}

.sp-city-title {
  font-family: var(--font-fun); font-size: 1rem; font-weight: 700;
  color: #FFD700; padding: 1rem 0 0.4rem;
  border-bottom: 1px solid rgba(255,215,0,0.12);
}
.sp-city-title:first-child { padding-top: 0.5rem; }

.sp-video-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 0.6rem; cursor: pointer; border-radius: 12px;
  transition: background 0.2s, transform 0.2s var(--ease-bounce);
}
.sp-video-item:hover { background: rgba(255,255,255,0.07); transform: translateX(4px); }

.sp-thumb {
  width: 80px; height: 55px; border-radius: 8px; overflow: hidden;
  background: #1a1a3a; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.sp-thumb video { width: 100%; height: 100%; object-fit: cover; }

.sp-name {
  font-family: var(--font-fun); font-size: 0.95rem; font-weight: 600; color: #fff;
}
.sp-location {
  font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-top: 3px;
}

@media (max-width: 900px) {
  .side-panel { width: 320px; }
  .side-panel.closed { right: -330px; }
}
@media (max-width: 600px) {
  .sp-thumb { width: 60px; height: 42px; }
}

.globe-pin {
  text-align: center; cursor: pointer; pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: transform 0.2s var(--ease-bounce);
}
.globe-pin:hover { transform: translate(-50%, -50%) scale(1.25); }

.pin-dot {
  width: 14px; height: 14px;
  background: var(--red);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(229,57,53,0.6), 0 2px 6px rgba(0,0,0,0.3);
  margin: 0 auto;
  position: relative;
}
.pin-dot::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 28px; height: 28px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(229,57,53,0.4);
  border-radius: 50%;
  animation: pingPulse 2s ease-out infinite;
}
@keyframes pingPulse {
  0%   { transform: translate(-50%,-50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2);   opacity: 0; }
}

.pin-label {
  font-family: var(--font-fun);
  font-size: 11px; font-weight: 700;
  color: #fff; white-space: nowrap;
  margin-top: 4px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  pointer-events: none;
}
.globe-pin:hover .pin-label { opacity: 1; transform: translateY(0); }

/* ── GALLERY ──────────────────────────────── */
.gallery-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(255,248,240,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(229,57,53,0.08);
  z-index: 55;
}
.gallery-topbar h2 { font-family: var(--font-fun); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; color: var(--red); }
.topbar-spacer { width: 100px; }

.btn-back {
  font-family: var(--font-fun); font-size: 0.9rem; font-weight: 600; color: var(--red);
  background: var(--white); border: 2px solid rgba(229,57,53,0.2); border-radius: 100px;
  padding: 0.45em 1.2em; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.2s var(--ease-bounce);
}
.btn-back:hover { background: rgba(229,57,53,0.06); border-color: var(--red); transform: translateX(-3px); }

.gallery-scroll {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 75px 2rem 2rem; background: #FFF8F0;
}

#region-gallery, #all-videos-section { z-index: 15; background: #FFF8F0; }

.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.3rem; max-width: 1200px; margin: 0 auto;
}

.city-group-header {
  grid-column: 1 / -1;
  font-family: var(--font-fun); font-size: 1.2rem; font-weight: 700; color: var(--red);
  padding: 0.8rem 0 0.3rem; border-bottom: 2px solid rgba(229,57,53,0.12);
}

.video-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px var(--shadow-soft);
  transition: transform 0.35s var(--ease-bounce), box-shadow 0.35s, border-color 0.3s;
}
.video-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 16px 40px var(--shadow-col); border-color: var(--red); }

.card-thumb { position: relative; width: 100%; aspect-ratio: 16/9; background: #f0e8e0; overflow: hidden; }
.card-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.video-card:hover .card-thumb video { transform: scale(1.06); }

.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(229,57,53,0.4); z-index: 2;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
}
.play-btn::after { content: ''; width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 16px; border-color: transparent transparent transparent #fff; margin-left: 3px; }
.video-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 8px 30px rgba(229,57,53,0.5); }

.card-info { padding: 0.85em 1.1em; }
.card-name { font-family: var(--font-fun); font-size: 1.05rem; font-weight: 600; color: var(--text); }

/* ── MODAL ────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(60,40,40,0.7); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.modal-body {
  position: relative; z-index: 2; width: 92%; max-width: 900px; text-align: center;
  transform: scale(0.88) translateY(20px); transition: transform 0.5s var(--ease-bounce);
}
.modal.active .modal-body { transform: scale(1) translateY(0); }
.modal-body video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-close {
  position: absolute; top: -2.5rem; right: 0; font-size: 1.8rem; color: #fff;
  background: var(--red); border: none; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(229,57,53,0.3); transition: transform 0.2s var(--ease-bounce);
}
.modal-close:hover { transform: scale(1.1); }
.modal-label {
  font-family: var(--font-fun); font-size: 1.1rem; font-weight: 600; color: var(--text);
  margin-top: 0.8rem; background: var(--white); padding: 0.5em 1em; border-radius: 100px;
  display: inline-block; box-shadow: 0 2px 10px var(--shadow-soft);
}

/* ── SCROLLBAR ────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 10px; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
  .gallery-topbar { padding: 0.7rem 1rem; }
  .gallery-scroll { padding: 70px 1rem 1.5rem; }
  #topnav { padding: 0.6rem 1rem; }
  .btn-floating { bottom: 1.2rem; font-size: 0.85rem; padding: 0.7em 1.3em; }

  /* Balloon behind content on mobile */
  #balloon57 { z-index: 0; opacity: 0.4; }

  /* Hide planets on mobile */
  .fake-planet { display: none; }

  /* Side panel as bottom sheet */
  .side-panel {
    width: 100%; height: 55vh;
    top: auto; right: 0; bottom: 0; left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px 20px 0 0;
    transition: transform 0.35s var(--ease-out);
    transform: translateY(0);
  }
  .side-panel.closed {
    right: 0;
    transform: translateY(100%);
  }
}
