:root {
  --pink: #ff4d8d;
  --pink-hot: #ff2d7a;
  --pink-soft: #ffb3d1;
  --pink-pale: #ffe6f0;
  --rose: #e91e63;
  --blush: #fff0f6;
  --cream: #fff8fb;
  --coral: #ff6b9d;
  --gold: #ffc857;
  --sky: #7ec8ff;
  --mint: #5ee0b5;
  --lavender: #c9a0ff;
  --ink: #4a2140;
  --ink-soft: #7a4a6a;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(233, 30, 99, 0.18);
  --radius: 28px;
  --ar: "Cairo", sans-serif;
  --en: "Nunito", sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--blush);
  font-family: var(--en);
}

body {
  position: relative;
}

/* ===== Background world ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, #ffd6e8 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 15%, #ffc2dc 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, #ffe0ef 0%, transparent 55%),
    linear-gradient(160deg, #fff5fa 0%, #ffe8f3 45%, #ffd6ea 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(255, 77, 141, 0.25) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 70%, rgba(255, 200, 87, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 75%, rgba(126, 200, 255, 0.3) 0 2px, transparent 3px);
  background-size: 120px 120px, 180px 180px, 150px 150px, 200px 200px;
  animation: twinkle 6s ease-in-out infinite alternate;
  opacity: 0.7;
}

@keyframes twinkle {
  from { opacity: 0.45; }
  to { opacity: 0.85; }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: floaty 12s ease-in-out infinite;
}

.b1 {
  width: 340px;
  height: 340px;
  background: #ff9ec8;
  top: -80px;
  left: -60px;
}

.b2 {
  width: 280px;
  height: 280px;
  background: #ffc857;
  bottom: 10%;
  right: -40px;
  animation-delay: -4s;
}

.b3 {
  width: 220px;
  height: 220px;
  background: #a8e0ff;
  bottom: -40px;
  left: 30%;
  animation-delay: -7s;
}

@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.08); }
}

.ribbon-float {
  position: absolute;
  font-size: 2.4rem;
  animation: bob 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(255, 45, 122, 0.25));
  user-select: none;
}

.r1 { top: 18%; left: 6%; animation-delay: 0s; }
.r2 { top: 28%; right: 8%; font-size: 2rem; animation-delay: -1.5s; }
.r3 { bottom: 22%; left: 12%; font-size: 1.8rem; animation-delay: -2.8s; }
.r4 { top: 55%; right: 14%; font-size: 2.2rem; animation-delay: -0.8s; }
.r5 { bottom: 12%; right: 28%; font-size: 1.6rem; animation-delay: -3.2s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* Confetti canvas */
#confetti {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ===== Top bar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr minmax(120px, 280px) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.logo-img {
  height: 56px;
  width: auto;
  max-width: min(240px, 48vw);
  object-fit: contain;
  border-radius: 14px;
  background: #000;
  padding: 6px 10px;
  box-shadow: 0 8px 20px rgba(74, 33, 64, 0.18);
  flex-shrink: 0;
  display: block;
}

.school-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  animation: pop-in 0.55s ease both;
}

.school-hero-logo {
  width: min(380px, 78vw);
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  background: #000;
  padding: 14px 22px;
  box-shadow: 0 16px 40px rgba(255, 45, 122, 0.22);
  display: block;
}

.school-hero-en {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  color: var(--ink);
}

.school-hero-ar {
  margin: 0;
  font-family: var(--ar);
  font-weight: 800;
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  color: var(--rose);
}

.brand-text strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.15;
  color: var(--ink);
}

.brand-text span {
  display: block;
  font-family: var(--ar);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 77, 141, 0.25);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(255, 45, 122, 0.08);
}

.progress-fill {
  height: 100%;
  width: 12.5%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--pink-hot));
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes shimmer {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.counter {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--rose);
  background: white;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--pink-soft);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.sound-btn {
  border: 2px solid var(--pink-soft);
  background: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s;
}

.sound-btn:hover {
  transform: scale(1.08);
  background: var(--pink-pale);
}

.sound-btn.muted {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* ===== Deck ===== */
.deck {
  position: fixed;
  top: 76px;
  bottom: 52px;
  left: 88px;
  right: 88px;
  z-index: 10;
  margin: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
  display: grid;
  place-items: center;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.slide-inner {
  width: min(1100px, 96%);
  max-height: 100%;
  overflow: auto;
  padding: 8px 4px 16px;
}

/* Title slides */
.title-slide {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-art {
  position: relative;
  width: min(280px, 55vw);
  height: min(180px, 28vw);
  margin-bottom: 6px;
}

.hero-art svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: white;
  border: 2px solid var(--pink-soft);
  font-weight: 800;
  color: var(--rose);
  box-shadow: var(--shadow);
  animation: pop-in 0.6s ease both;
}

.title-slide h1 {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.15;
}

.title-slide h1 .en {
  font-family: var(--en);
  font-size: clamp(1.8rem, 4.5vw, 3.1rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--pink-hot), var(--rose), #ff8fb8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-slide h1 .ar {
  font-family: var(--ar);
  font-size: clamp(1.55rem, 3.8vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
}

.subtitle {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  font-weight: 700;
}

.subtitle .ar {
  font-family: var(--ar);
}

.pill {
  margin-top: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  color: white;
  background: linear-gradient(90deg, var(--pink-hot), var(--coral), #ff8fb8);
  box-shadow: 0 12px 28px rgba(255, 45, 122, 0.35);
  animation: bounce-soft 2.2s ease-in-out infinite;
}

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tiny {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.9;
}

.tiny .ar {
  font-family: var(--ar);
}

/* Section titles */
.section-title {
  margin: 0 0 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title .en {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--pink-hot);
}

.section-title .ar {
  font-family: var(--ar);
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
}

/* Bilingual split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  border: 3px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
  animation: pop-in 0.55s ease both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: linear-gradient(145deg, var(--pink), var(--gold), var(--sky));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.en-panel {
  animation-delay: 0.05s;
}

.ar-panel {
  animation-delay: 0.15s;
  font-family: var(--ar);
}

.panel .icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: wiggle 2.8s ease-in-out infinite;
}

.panel .icon.big {
  font-size: 3.4rem;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rose);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pink-pale);
  padding: 4px 12px;
  border-radius: 999px;
}

.panel p {
  margin: 0 0 10px;
  line-height: 1.65;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.panel ul,
.panel ol {
  margin: 8px 0 0;
  padding-inline-start: 1.25rem;
  display: grid;
  gap: 8px;
}

.panel li {
  font-weight: 700;
  line-height: 1.45;
  font-size: 1.02rem;
}

.panel.hope .quote {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0f6, #ffe8c8);
  border: 2px dashed var(--pink);
  font-size: 1.1rem;
  color: var(--rose);
}

/* Action cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 20px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 3px solid var(--pink-soft);
  transition: transform 0.25s ease, box-shadow 0.25s;
  animation: pop-in 0.5s ease both;
  cursor: default;
}

.card:nth-child(1) { animation-delay: 0.05s; border-color: #ff9ec8; background: linear-gradient(180deg, #fff, #ffe6f0); }
.card:nth-child(2) { animation-delay: 0.12s; border-color: #ffc857; background: linear-gradient(180deg, #fff, #fff4d6); }
.card:nth-child(3) { animation-delay: 0.19s; border-color: #7ec8ff; background: linear-gradient(180deg, #fff, #e6f5ff); }
.card:nth-child(4) { animation-delay: 0.26s; border-color: #5ee0b5; background: linear-gradient(180deg, #fff, #e6fff5); }

.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 22px 40px rgba(255, 45, 122, 0.22);
}

.card-icon {
  display: block;
  font-size: 2.6rem;
  margin-bottom: 10px;
  animation: bob 3s ease-in-out infinite;
}

.card .en {
  margin: 0;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
}

.card .ar {
  margin: 6px 0 0;
  font-family: var(--ar);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Habit strips */
.habit-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.habit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--pink-pale);
  font-weight: 700;
}

.habit .n {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(145deg, var(--pink-hot), var(--coral));
  flex-shrink: 0;
}

/* Decorative sticker */
.sticker-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sticker {
  font-size: 2rem;
  background: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  border: 3px solid var(--pink-soft);
  animation: bob 3.5s ease-in-out infinite;
}

.sticker:nth-child(2) { animation-delay: -0.7s; border-color: #ffc857; }
.sticker:nth-child(3) { animation-delay: -1.4s; border-color: #7ec8ff; }
.sticker:nth-child(4) { animation-delay: -2.1s; border-color: #5ee0b5; }
.sticker:nth-child(5) { animation-delay: -2.8s; border-color: #c9a0ff; }

/* ===== Nav — side arrows + bottom dots ===== */
.nav {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.nav-btn {
  pointer-events: auto;
  font-family: var(--en);
  font-weight: 800;
  font-size: 0.85rem;
  border: 3px solid var(--pink-soft);
  background: white;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  line-height: 1.15;
}

.nav-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  min-height: 72px;
  justify-content: center;
  border-radius: 24px;
  padding: 14px 12px;
}

.nav-prev {
  left: 14px;
}

.nav-next {
  right: 14px;
}

.nav-arrow {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 800;
}

.nav-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.78rem;
}

.nav-label small {
  font-family: var(--ar);
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
}

.nav-btn:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.06);
  background: var(--pink-pale);
  box-shadow: 0 16px 36px rgba(255, 45, 122, 0.28);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav-btn.primary {
  color: white;
  border-color: transparent;
  background: linear-gradient(160deg, var(--pink-hot), var(--coral));
}

.nav-btn.primary:hover:not(:disabled) {
  background: linear-gradient(160deg, var(--rose), var(--pink-hot));
}

.dots {
  pointer-events: auto;
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid var(--pink-soft);
  box-shadow: var(--shadow);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: #ffc2dc;
  transition: transform 0.2s, background 0.2s, width 0.2s;
}

.dot.active {
  width: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink-hot), var(--gold));
  transform: scale(1.05);
}

.hint {
  position: fixed;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.hint.show {
  opacity: 1;
}

/* Start overlay for audio unlock */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, #ffb3d1, transparent 45%),
    radial-gradient(circle at 70% 60%, #ffc857aa, transparent 40%),
    linear-gradient(160deg, #ffe6f0, #ffc2dc);
  text-align: center;
  padding: 24px;
  transition: opacity 0.5s, visibility 0.5s;
}

.gate.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  background: white;
  border-radius: 32px;
  padding: 28px 28px 36px;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(233, 30, 99, 0.25);
  border: 4px solid var(--pink-soft);
  animation: pop-in 0.55s ease both;
}

.gate-logo {
  width: min(280px, 70vw);
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: #000;
  padding: 12px 16px;
  margin: 0 auto 10px;
  display: block;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gate-school-en {
  margin: 0;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}

.gate-school-ar {
  margin: 2px 0 12px;
  font-family: var(--ar);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--rose);
}

.gate-card .big-emoji {
  font-size: 3.2rem;
  display: block;
  animation: bob 2.5s ease-in-out infinite;
}

.gate-card h2 {
  margin: 10px 0 6px;
  font-size: 1.6rem;
  color: var(--pink-hot);
}

.gate-card .ar-line {
  font-family: var(--ar);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 0 16px;
  color: var(--ink);
}

.gate-card p {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ink-soft);
}

.start-btn {
  margin-top: 16px;
  border: none;
  cursor: pointer;
  font-family: var(--en);
  font-weight: 800;
  font-size: 1.15rem;
  color: white;
  padding: 16px 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink-hot), var(--coral), #ff8fb8);
  box-shadow: 0 14px 30px rgba(255, 45, 122, 0.4);
  animation: bounce-soft 2s ease-in-out infinite;
}

.start-btn:hover {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
    height: 68px;
    padding: 10px 14px;
  }

  .progress {
    display: none;
  }

  .split,
  .cards {
    grid-template-columns: 1fr;
  }

  .deck {
    top: 68px;
    bottom: 48px;
    left: 58px;
    right: 58px;
  }

  .nav-side {
    min-width: 52px;
    min-height: 52px;
    padding: 10px 8px;
    border-radius: 18px;
  }

  .nav-label {
    display: none;
  }

  .nav-arrow {
    font-size: 1.7rem;
  }

  .nav-prev {
    left: 6px;
  }

  .nav-next {
    right: 6px;
  }
}

@media (max-width: 720px) {
  .brand-text {
    display: none;
  }

  .logo-img {
    height: 44px;
    max-width: min(180px, 55vw);
  }
}

@media (max-width: 520px) {
  .ribbon-float {
    font-size: 1.5rem;
  }

  .deck {
    left: 48px;
    right: 48px;
  }
}
