:root {
  --navy: #061b2b;
  --deep: #021018;
  --aqua: #00cfe8;
  --blue: #087dff;
  --foam: #e9fbff;
  --mint: #72f5d1;
  --sun: #ffe08a;
  --panel: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #c9e7ee;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(0,207,232,.22), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(114,245,209,.16), transparent 38%),
    linear-gradient(180deg, var(--navy), var(--deep));
  color: var(--text);
  overflow-x: hidden;
}

a { color: var(--foam); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 6%;
  background: rgba(2, 16, 24, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233,251,255,.22);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transform: scale(1.08);
  transform-origin: left center;
}

.logo-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--aqua), var(--blue));
  box-shadow: 0 0 22px rgba(0,207,232,.55), inset 0 0 18px rgba(255,255,255,.35);
}

.logo-text strong {
  display: block;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: .9;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 14px rgba(0,207,232,.85);
}

.logo-text strong span {
  color: var(--mint);
  font-style: italic;
}

.logo-text small {
  color: var(--foam);
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: .72rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav a {
  text-decoration: none;
  font-weight: 800;
  color: var(--foam);
  opacity: .95;
}

nav a:hover {
  color: var(--mint);
  text-shadow: 0 0 12px var(--mint);
}

.mission-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(0,207,232,.2), transparent 32%),
    linear-gradient(180deg, #00354b, #001017);
  animation: introExit .9s ease forwards;
  animation-delay: 4.8s;
}

.water-bubbles::before,
.water-bubbles::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.6) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(114,245,209,.4) 0 3px, transparent 4px);
  background-size: 90px 90px, 135px 135px;
  animation: bubbles 8s linear infinite;
  opacity: .45;
}

.mission-box {
  position: relative;
  width: min(760px, 90vw);
  text-align: center;
  padding: 42px;
  border: 1px solid rgba(233,251,255,.5);
  border-radius: 28px;
  background: rgba(2, 16, 24, .72);
  box-shadow: 0 0 40px rgba(0,207,232,.24), inset 0 0 40px rgba(255,255,255,.08);
}

.mission-box h1 {
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  margin: 10px 0;
  color: var(--foam);
  text-shadow: 0 0 12px var(--aqua), 0 0 34px var(--blue);
}

.eyebrow, .tag {
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 900;
}

.hero {
  min-height: 82vh;
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 30px;
  padding: 85px 6%;
  overflow: hidden;
}

.foam-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(233,251,255,.18) 0 70px, transparent 72px),
    radial-gradient(circle at 60% 20%, rgba(233,251,255,.13) 0 50px, transparent 52px),
    radial-gradient(circle at 80% 75%, rgba(114,245,209,.11) 0 90px, transparent 92px);
  pointer-events: none;
}

.hero-content, .wash-card, .section { position: relative; z-index: 2; }

.hero h1, .section h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: .98;
  max-width: 860px;
  margin: 10px 0 20px;
}

.hero p, .section p { color: var(--muted); line-height: 1.7; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 25px;
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  background: linear-gradient(90deg, var(--foam), var(--aqua), var(--mint));
  color: #00202b;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(0,207,232,.35);
  transition: transform .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 34px rgba(114,245,209,.48);
}

.btn.ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid rgba(233,251,255,.55);
}

.wash-card, .card, .booking-form {
  background: var(--panel);
  border: 1px solid rgba(233,251,255,.22);
  box-shadow: 0 0 28px rgba(0,207,232,.12);
  border-radius: 24px;
}

.wash-card { padding: 28px; }
.wash-card li { margin: 12px 0; color: var(--muted); }

.section { padding: 78px 6%; }

.section h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 8px 0 24px;
}

.game-section {
  background: linear-gradient(180deg, rgba(233,251,255,.08), rgba(0,207,232,.06));
}

.game-area {
  position: relative;
  height: 310px;
  overflow: hidden;
  border-radius: 28px;
  border: 2px solid rgba(233,251,255,.35);
  background: linear-gradient(180deg, #76d7ff 0%, #bff7ff 48%, #09314a 49%, #061724 100%);
  box-shadow: 0 0 35px rgba(0,207,232,.25);
  outline: none;
}

.sunset-glow {
  position: absolute;
  right: 70px;
  top: 34px;
  width: 78px;
  height: 78px;
  background: radial-gradient(circle, var(--sun), rgba(255,224,138,.25), transparent 70%);
  border-radius: 50%;
}

.city-silhouette {
  position: absolute;
  bottom: 74px;
  left: 0;
  width: 240%;
  height: 95px;
  background:
    linear-gradient(to top, #042338 0 100%, transparent),
    repeating-linear-gradient(90deg,
      transparent 0 22px,
      rgba(255,255,255,.18) 22px 25px,
      transparent 25px 60px);
  clip-path: polygon(
    0 100%, 0 45%, 4% 45%, 4% 25%, 8% 25%, 8% 58%, 12% 58%, 12% 35%,
    17% 35%, 17% 12%, 22% 12%, 22% 60%, 27% 60%, 27% 30%, 31% 30%,
    31% 48%, 36% 48%, 36% 20%, 42% 20%, 42% 55%, 48% 55%, 48% 34%,
    53% 34%, 53% 16%, 57% 16%, 57% 54%, 63% 54%, 63% 25%, 68% 25%,
    68% 50%, 74% 50%, 74% 32%, 79% 32%, 79% 17%, 84% 17%, 84% 57%,
    90% 57%, 90% 38%, 95% 38%, 95% 24%, 100% 24%, 100% 100%
  );
  animation: cityMove 13s linear infinite;
}

.road-line {
  position: absolute;
  bottom: 72px;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, transparent, var(--foam), transparent);
  box-shadow: 0 0 14px var(--aqua);
}

.game-car {
  position: absolute;
  left: 80px;
  bottom: 73px;
  font-size: 52px;
  transform: scaleX(1);
  filter: drop-shadow(0 0 10px var(--aqua));
  z-index: 5;
}

.game-car.jump {
  animation: jump .62s ease-out;
}

.hurdle {
  position: absolute;
  right: -60px;
  bottom: 76px;
  width: 35px;
  height: 48px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #ff8a3d, #d94b15);
  border: 3px solid #fff3d6;
  animation: hurdleMove 2.15s linear infinite;
  z-index: 4;
}

.score {
  position: absolute;
  top: 16px;
  left: 18px;
  font-weight: 900;
  color: #00202b;
  background: rgba(255,255,255,.72);
  padding: 8px 13px;
  border-radius: 999px;
}

.game-hint {
  position: absolute;
  top: 16px;
  right: 18px;
  font-weight: 900;
  color: #00202b;
  background: rgba(255,255,255,.72);
  padding: 8px 13px;
  border-radius: 999px;
}

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

.card {
  padding: 24px;
  min-height: 190px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(114,245,209,.55);
  box-shadow: 0 0 36px rgba(114,245,209,.18);
}

.card.featured { border-color: rgba(233,251,255,.55); }

.price {
  display: inline-block;
  margin-top: 18px;
  color: var(--mint);
  font-weight: 900;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.image-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(233,251,255,.2);
}

.image-card img, .product img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-card h3 { padding: 0 18px 18px; }

.booking-section {
  background: linear-gradient(90deg, rgba(0,207,232,.08), rgba(114,245,209,.08));
}

.booking-form {
  padding: 24px;
  max-width: 900px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input, select, textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(233,251,255,.25);
  background: rgba(2,16,24,.58);
  color: #fff;
}

textarea { min-height: 120px; resize: vertical; }

.booking-output {
  white-space: pre-wrap;
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(2,16,24,.5);
  border: 1px dashed rgba(114,245,209,.45);
  display: none;
}

.contact { text-align: center; }

.product img {
  border-radius: 18px;
  margin-bottom: 18px;
  aspect-ratio: 1 / 1;
}

.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

footer {
  padding: 24px 6%;
  text-align: center;
  color: var(--muted);
  background: rgba(2,16,24,.72);
}

@keyframes jump {
  0%, 100% { bottom: 73px; }
  45% { bottom: 158px; }
}

@keyframes hurdleMove {
  from { right: -60px; }
  to { right: calc(100% + 80px); }
}

@keyframes cityMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes bubbles {
  from { transform: translateY(0); }
  to { transform: translateY(-220px); }
}

@keyframes introExit {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .brand-logo { transform: scale(1); }
  .grid, .gallery, .form-row, .shop-grid { grid-template-columns: 1fr; }
  .game-hint { display: none; }
}


/* LEVEL 5: Fix The City title + logo refresh */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Russo+One&display=swap');

.brand-logo {
  gap: 16px;
}

.logo-icon {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  font-size: 38px;
  background: linear-gradient(135deg, #ffffff 0%, #dffbff 35%, #00cfe8 100%);
  border: 3px solid rgba(255,255,255,.7);
}

.logo-text strong {
  font-family: 'Russo One', Arial, sans-serif;
  font-size: clamp(1.95rem, 3.4vw, 2.95rem);
  letter-spacing: 2px;
  transform: skew(-7deg);
  display: inline-block;
}

.hero h1,
.mission-box h1,
.game-section h2 {
  font-family: 'Bangers', Impact, Arial, sans-serif;
  letter-spacing: 2px;
  font-weight: 400;
  text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 22px rgba(0,207,232,.65);
}

.mission-box h1 {
  color: #ffffff;
  font-size: clamp(3rem, 8vw, 6rem);
}

/* Game moved to very top */
main > .game-section:first-child {
  padding-top: 36px;
  border-bottom: 1px solid rgba(233,251,255,.18);
}

/* Replace city buildings with pothole road track */
.pothole-track {
  position: absolute;
  left: 0;
  bottom: 72px;
  width: 240%;
  height: 60px;
  background:
    radial-gradient(ellipse at 12% 70%, rgba(0,0,0,.65) 0 18px, transparent 19px),
    radial-gradient(ellipse at 34% 68%, rgba(0,0,0,.55) 0 14px, transparent 15px),
    radial-gradient(ellipse at 58% 72%, rgba(0,0,0,.62) 0 20px, transparent 21px),
    radial-gradient(ellipse at 81% 70%, rgba(0,0,0,.55) 0 15px, transparent 16px);
  animation: cityMove 9s linear infinite;
  opacity: .9;
}

.city-silhouette {
  display: none;
}

.pothole {
  position: absolute;
  right: -90px;
  bottom: 75px;
  width: 72px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #000 0 45%, #1d1d1d 55%, #5c5c5c 100%);
  border: 3px solid rgba(255,255,255,.35);
  box-shadow: inset 0 7px 10px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.5);
  animation: hurdleMove 2.15s linear infinite;
  z-index: 4;
}

.hurdle {
  display: none;
}

.ouch-text {
  position: absolute;
  left: 128px;
  bottom: 150px;
  z-index: 8;
  font-family: 'Bangers', Impact, Arial, sans-serif;
  font-size: 54px;
  color: #ff3d3d;
  letter-spacing: 3px;
  text-shadow: 0 4px 0 #000, 0 0 14px #fff;
  animation: ouchPop .7s ease forwards;
  pointer-events: none;
}

@keyframes ouchPop {
  0% { transform: scale(.4) rotate(-10deg); opacity: 0; }
  30% { transform: scale(1.25) rotate(5deg); opacity: 1; }
  100% { transform: scale(.9) translateY(-30px); opacity: 0; }
}


/* Level 6 mobile gameplay improvements */
.pothole{
  width:45px !important;
  height:16px !important;
  animation:hurdleMove 2.6s linear infinite !important;
}

@keyframes jump{
  0%,100%{bottom:73px;}
  45%{bottom:170px;}
}

.mobile-jump-hint{
  position:absolute;
  bottom:120px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(0,0,0,.65);
  color:#fff;
  padding:10px 18px;
  border-radius:999px;
  font-weight:bold;
  z-index:10;
  animation:pulseHint 1.5s infinite;
}

@keyframes pulseHint{
  0%{opacity:.5;}
  50%{opacity:1;}
  100%{opacity:.5;}
}

@media (max-width:768px){
  .pothole{
    width:38px !important;
    height:14px !important;
    animation:hurdleMove 3s linear infinite !important;
  }
  .game-car{
    font-size:48px;
  }
}

@media (min-width:769px){
  .mobile-jump-hint{display:none;}
}


/* Level 7 mini-game music button */
.music-toggle {
  position: absolute;
  top: 58px;
  right: 18px;
  z-index: 12;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255,255,255,.78);
  color: #00202b;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0,207,232,.28);
}

.music-toggle:hover {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .music-toggle {
    top: 14px;
    right: 14px;
  }
}


/* Level 8: softer game + easier mobile jump */
.pothole {
  width: 34px !important;
  height: 12px !important;
  animation: hurdleMove 3.05s linear infinite !important;
}

.game-car.jump {
  animation: jumpEasy .82s ease-out !important;
}

@keyframes jumpEasy {
  0%, 100% { bottom: 73px; }
  40%, 58% { bottom: 190px; }
}

@media (max-width: 768px) {
  .pothole {
    width: 28px !important;
    height: 10px !important;
    animation: hurdleMove 3.65s linear infinite !important;
  }

  .game-car {
    font-size: 46px !important;
  }

  .game-car.jump {
    animation: jumpEasyMobile .95s ease-out !important;
  }

  @keyframes jumpEasyMobile {
    0%, 100% { bottom: 73px; }
    36%, 64% { bottom: 205px; }
  }
}


/* Level 9: GitHub Pages audio fix + middle-ground jump */
.game-car.jump {
  animation: jumpBalanced .72s ease-out !important;
}

@keyframes jumpBalanced {
  0%, 100% { bottom: 73px; }
  45% { bottom: 150px; }
}

@media (max-width: 768px) {
  .game-car.jump {
    animation: jumpBalancedMobile .80s ease-out !important;
  }

  @keyframes jumpBalancedMobile {
    0%, 100% { bottom: 73px; }
    45% { bottom: 160px; }
  }
}


/* Level 10: reliable click-to-start sound */
.music-toggle {
  min-width: 112px;
}

.sound-toast {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  z-index: 20;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(0,0,0,.68);
  color: #fff;
  font-weight: 900;
  pointer-events: none;
  animation: soundToast 1.1s ease forwards;
}

@keyframes soundToast {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-25px); }
}
