/* Optional presentation pass for Pepsi Rush. Load after the inline game CSS. */
:root {
  --street-glass: rgba(4, 18, 42, .78);
  --street-line: rgba(255, 255, 255, .16);
}

/* Let the authored street remain a quiet part of the start card instead of
   hiding the whole 3D stage behind an opaque navy sheet. */
.screen {
  background:
    radial-gradient(95% 70% at 50% 0%, rgba(31, 104, 176, .48), rgba(4, 18, 42, .86) 72%),
    linear-gradient(180deg, rgba(4, 18, 42, .72), rgba(4, 18, 42, .94));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#startScreen .card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 25px 20px 18px;
  border: 1px solid var(--street-line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(8, 29, 57, .84), rgba(4, 18, 42, .68));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.09);
}

#startScreen .card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 210px;
  height: 210px;
  top: -122px;
  right: -92px;
  border: 22px solid rgba(201, 0, 43, .24);
  border-radius: 50%;
  box-shadow: -12px 0 0 rgba(0, 75, 147, .24);
  transform: rotate(-18deg);
}

#startScreen .mark { width: min(40vw, 142px); margin-bottom: 13px; }
#startScreen h1 { letter-spacing: .06em; text-shadow: 0 4px 22px rgba(0, 0, 0, .28); }
#startScreen .sub { max-width: 31ch; margin-left: auto; margin-right: auto; }
#startScreen .ctrls { margin-top: 16px; }
#startScreen .scoreGuide {
  max-width: 52ch;
  margin: 10px auto 0;
  color: rgba(255,255,255,.68);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .035em;
}
#startScreen .legal { margin-top: 14px; }

#hud .pill,
#missions,
#prompt .k,
#prompt .s {
  background: var(--street-glass);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}

#missions { border-radius: 10px; padding: 4px 7px; }
#bottom {
  padding: 8px 10px 9px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(4, 18, 42, .54);
  box-shadow: 0 8px 22px rgba(0,0,0,.17);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
#chunkName, #progLbl { text-shadow: 0 2px 8px rgba(0,0,0,.58); }

@media (max-width: 430px) {
  #startScreen .card { padding: 21px 16px 15px; border-radius: 20px; }
  #startScreen .mark { width: min(38vw, 128px); }
}

/* Campaign presentation -------------------------------------------------- */
#startScreen {
  background:
    linear-gradient(180deg, rgba(1, 10, 27, .30), rgba(2, 12, 31, .94) 64%),
    url("/arcade/pepsi-rush/art/keyart-start.jpg") center/cover no-repeat;
}
#startScreen .card { max-width: 520px; }
#startScreen h1 {
  font-size: clamp(48px, 12vw, 76px);
  font-style: italic;
  line-height: .82;
  margin-bottom: 14px;
}
#startScreen .sub { font-size: 14px; max-width: 39ch; }
.campaignMap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 15px;
  text-align: left;
}
body[dir="rtl"] .campaignMap { text-align: right; }
.campaignMap div {
  min-width: 0;
  padding: 10px 9px 9px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
}
.campaignMap i {
  display: block;
  color: #66a9ff;
  font: 900 10px/1 var(--brand-font);
  font-style: normal;
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.campaignMap div:nth-child(3) i { color: #ff4968; }
.campaignMap b, .campaignMap span { display: block; }
.campaignMap b { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.campaignMap span { margin-top: 3px; color: rgba(255,255,255,.52); font-size: 9px; line-height: 1.25; }

/* A persistent race readout: chapter, live objective and the next gate. */
#chapterHud {
  position: absolute;
  top: calc(71px + var(--sat));
  left: 50%;
  width: min(58vw, 310px);
  transform: translateX(-50%);
  padding: 7px 13px 8px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 11px;
  text-align: center;
  background: linear-gradient(180deg, rgba(4,18,42,.86), rgba(4,18,42,.62));
  box-shadow: 0 9px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
#chapterHud span, #chapterHud b { display: block; }
#chapterCount { color: #72adff; font-size: 8px; font-weight: 900; letter-spacing: .19em; }
#chapterTitle { margin-top: 3px; font-size: 13px; line-height: 1; letter-spacing: .09em; }
#chapterObjective { margin-top: 4px; color: rgba(255,255,255,.58); font-size: 9px; }
body.stage-2 #chapterCount { color: #a4d4ff; }
body.stage-3 #chapterCount { color: #ff5875; }

#chunkName {
  top: calc(135px + var(--sat));
  color: #fff;
  font-size: 10px;
  text-shadow: 0 3px 12px rgba(0,0,0,.9);
}
#missions { top: calc(158px + var(--sat)); max-width: 48%; }

/* The route bar reads like three connected stages, with real gate markers. */
#prog { overflow: visible; }
#progFill { overflow: hidden; }
#prog .cp {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: #0b1e3c;
  box-shadow: 0 0 0 2px rgba(4,18,42,.7);
}
#prog .c1 { left: 33.333%; }
#prog .c2 { left: 66.666%; }
#prog .cp.done { background: #fff; border-color: #2e7cd6; box-shadow: 0 0 14px #4c9bff; }

#eventToast {
  position: absolute;
  top: 25%;
  left: 50%;
  width: min(84vw, 390px);
  padding: 13px 18px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-left: 4px solid var(--pepsi-red);
  border-radius: 4px 16px 16px 4px;
  background: linear-gradient(95deg, rgba(2,15,37,.95), rgba(5,35,72,.88));
  box-shadow: 0 18px 48px rgba(0,0,0,.38);
  opacity: 0;
  transform: translate(-50%, 14px) scale(.96);
  transition: opacity .18s, transform .26s cubic-bezier(.2,.9,.2,1);
}
body[dir="rtl"] #eventToast { border-left: 1px solid rgba(255,255,255,.2); border-right: 4px solid var(--pepsi-red); }
#eventToast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#eventToast small, #eventToast b, #eventToast span { display: block; }
#eventToast small { color: #72adff; font-size: 8px; font-weight: 900; letter-spacing: .2em; }
#eventToast b { margin-top: 3px; font-size: clamp(19px, 5vw, 26px); font-style: italic; letter-spacing: .02em; }
#eventToast span { margin-top: 3px; color: rgba(255,255,255,.64); font-size: 10px; letter-spacing: .04em; }

/* Explicit controls remain reachable on touch devices while the full playfield
   still accepts swipes. Buttons stay low and outside the obstacle horizon. */
#mobileControls {
  position: absolute;
  left: calc(12px + var(--sal));
  right: calc(12px + var(--sar));
  bottom: calc(92px + var(--sab));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}
.moveControls { display: flex; gap: 8px; }
.actionbtn {
  pointer-events: auto;
  width: 52px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px;
  color: white;
  background: rgba(4,18,42,.70);
  box-shadow: 0 8px 24px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.11);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: 900 23px/1 var(--brand-font);
  touch-action: manipulation;
}
.actionbtn.jump, .actionbtn.slide { width: 59px; height: 55px; }
.actionbtn span, .actionbtn small { display: block; pointer-events: none; }
.actionbtn small { margin-top: 3px; color: rgba(255,255,255,.62); font-size: 7px; letter-spacing: .12em; }
.actionbtn.pressed, .actionbtn:active { transform: scale(.9); background: rgba(21,82,154,.9); }
.actionbtn.slide { border-color: rgba(255,73,104,.44); }

#overScreen {
  background:
    linear-gradient(180deg, rgba(1,10,27,.42), rgba(2,12,31,.96) 68%),
    url("/arcade/pepsi-rush/art/keyart-results-finish.jpg") center/cover no-repeat;
}
#overScreen .card { max-width: 450px; padding: 22px; border-radius: 22px; background: rgba(3,18,43,.76); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(7px); }

@media (pointer:fine) and (min-width:700px) {
  #mobileControls { display: none; }
}
@media (max-height: 720px) {
  #startScreen .mark { width: min(28vw, 110px); margin-bottom: 8px; }
  #startScreen h1 { font-size: 46px; }
  #startScreen .sub { margin-bottom: 9px; }
  .campaignMap { margin: 8px 0; }
  #startScreen .ctrls, #startScreen .legal { margin-top: 7px; }
}
@media (max-width: 430px) {
  #chapterHud { width: 54vw; top: calc(69px + var(--sat)); }
  #chapterTitle { font-size: 11px; }
  #chapterObjective { font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #missions { top: calc(151px + var(--sat)); font-size: 9px; }
  .actionbtn { width: 47px; height: 45px; }
  .actionbtn.jump, .actionbtn.slide { width: 53px; height: 51px; }
  #mobileControls { bottom: calc(91px + var(--sab)); }
}
@media (prefers-reduced-motion: reduce) {
  #eventToast { transition: none; }
  .actionbtn { transition: none; }
}
