@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

body.frogger-deluxe {
  --rain-ink: #07141c;
  --rain-panel: rgba(6, 20, 27, .88);
  --rain-line: rgba(157, 255, 239, .22);
  --rain-cyan: #83ffe8;
  --rain-jade: #46e5ae;
  --rain-coral: #ff765f;
  --rain-cream: #fff5cf;
  color: #f3fff9 !important;
  background: #06131b !important;
  font-family: Manrope, "Segoe UI", sans-serif;
}

body.frogger-deluxe canvas { filter: none !important; }

body.frogger-deluxe #kenney-cloud-layer,
body.frogger-deluxe #kenney-grade-layer { display: none !important; }

body.frogger-deluxe::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: .24;
  background:
    repeating-linear-gradient(108deg, transparent 0 24px, rgba(194,255,246,.12) 25px, transparent 27px),
    radial-gradient(circle at 50% 58%, transparent 40%, rgba(0,8,14,.68) 125%);
  mix-blend-mode: screen;
  animation: rainline-drift 7s linear infinite;
}

@keyframes rainline-drift { to { background-position: 94px 138px, 0 0; } }

body.frogger-deluxe #hud {
  top: 16px;
  left: 50%;
  width: min(820px, calc(100vw - 32px));
  min-width: 0;
  transform: translateX(-50%);
  padding: 0;
  border: 1px solid var(--rain-line);
  border-radius: 18px;
  overflow: hidden;
  color: var(--rain-cream) !important;
  border-color: var(--rain-line) !important;
  background: linear-gradient(110deg, rgba(5,20,28,.92), rgba(8,31,38,.78)) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(14px) saturate(145%);
  text-shadow: none;
}

body.frogger-deluxe #hud .hud-main {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) repeat(4, minmax(82px, .65fr));
  align-items: stretch;
}

body.frogger-deluxe #hud .title {
  display: grid;
  align-content: center;
  margin: 0;
  padding: 10px 16px;
  font: 800 16px/1 Barlow Condensed, sans-serif;
  letter-spacing: 1.8px;
  color: var(--rain-cream);
  background: linear-gradient(110deg, rgba(54,226,174,.16), transparent);
}

body.frogger-deluxe #hud .title small {
  display: block;
  margin-top: 4px;
  color: var(--rain-cyan);
  font: 700 9px/1 Manrope, sans-serif;
  letter-spacing: 1.5px;
}

body.frogger-deluxe .hud-row { display: contents; }

body.frogger-deluxe .hud-stat {
  display: grid;
  place-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 8px 11px;
  border-left: 1px solid rgba(142,255,236,.12);
  color: #f6fbf7 !important;
  font: 800 18px/1 Barlow Condensed, sans-serif;
  text-align: center;
}

body.frogger-deluxe .hud-stat::before {
  content: attr(data-label);
  color: rgba(224,247,241,.62);
  font: 700 8px/1 Manrope, sans-serif;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

body.frogger-deluxe #lives { color: #ff917f !important; }
body.frogger-deluxe #crossings { color: var(--rain-jade) !important; }

body.frogger-deluxe #route-progress {
  height: 4px;
  background: rgba(255,255,255,.06);
}

body.frogger-deluxe #route-progress > i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rain-jade), var(--rain-cyan), var(--rain-cream));
  box-shadow: 0 0 15px rgba(97,255,222,.85);
  transition: width 180ms cubic-bezier(.2,.8,.2,1);
}

body.frogger-deluxe #hint {
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 9px 15px;
  border: 1px solid rgba(139,255,236,.16) !important;
  color: rgba(238,255,251,.72) !important;
  background: rgba(4,17,23,.68) !important;
  backdrop-filter: blur(12px);
  font-size: 10px;
  letter-spacing: .6px;
  white-space: nowrap;
}

body.frogger-deluxe #touch-pad { display: none; }

@media (pointer: coarse) {
  body.frogger-deluxe #hint { display: none; }
  body.frogger-deluxe #touch-pad {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 22;
    display: grid;
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(2, 50px);
    gap: 6px;
    pointer-events: auto;
  }
  body.frogger-deluxe #touch-pad button {
    display: grid;
    place-items: center;
    border: 1px solid rgba(139,255,235,.28);
    border-radius: 15px;
    color: var(--rain-cream);
    background: rgba(5,26,33,.8);
    box-shadow: 0 9px 25px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    font-size: 18px;
    touch-action: manipulation;
  }
  body.frogger-deluxe #touch-pad button:active { color: #05221e; background: var(--rain-cyan); }
  body.frogger-deluxe #touch-pad [data-move="up"] { grid-column: 2; grid-row: 1; }
  body.frogger-deluxe #touch-pad [data-move="left"] { grid-column: 1; grid-row: 2; }
  body.frogger-deluxe #touch-pad [data-move="down"] { grid-column: 2; grid-row: 2; }
  body.frogger-deluxe #touch-pad [data-move="right"] { grid-column: 3; grid-row: 2; }
  body.frogger-deluxe #menu:not(.hidden) ~ #touch-pad,
  body.frogger-deluxe:has(#menu:not(.hidden)) #touch-pad { display: none; }
}

body.frogger-deluxe #crossing-callout {
  position: fixed;
  top: 24%;
  left: 50%;
  z-index: 25;
  pointer-events: none;
  transform: translate(-50%, 18px) scale(.92);
  opacity: 0;
  color: var(--rain-cream);
  font: 800 clamp(28px, 5vw, 66px)/.85 Barlow Condensed, sans-serif;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 8px 40px rgba(0,0,0,.68), 0 0 25px rgba(76,255,205,.28);
  transition: opacity 160ms ease, transform 260ms cubic-bezier(.2,.8,.2,1);
}

body.frogger-deluxe #crossing-callout.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

body.frogger-deluxe #crossing-callout small {
  display: block;
  margin-top: 8px;
  color: var(--rain-cyan);
  font: 700 10px/1 Manrope, sans-serif;
  letter-spacing: .24em;
}

body.frogger-deluxe #crossing-flash {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(133,255,222,.4), transparent 62%);
  transition: opacity 360ms ease;
}

body.frogger-deluxe #crossing-flash.hit {
  background: radial-gradient(circle at center, rgba(255,84,70,.45), transparent 64%);
}

body.frogger-deluxe #crossing-flash.show { opacity: 1; transition-duration: 45ms; }

body.frogger-deluxe #menu {
  background:
    linear-gradient(180deg, rgba(1,15,23,.26), rgba(1,10,16,.78)),
    radial-gradient(circle at 18% 15%, rgba(49,225,183,.2), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(255,109,91,.16), transparent 34%),
    repeating-linear-gradient(108deg, transparent 0 28px, rgba(157,255,240,.04) 29px, transparent 31px),
    #071821;
  backdrop-filter: blur(12px);
  background:
    linear-gradient(180deg, rgba(1,15,23,.26), rgba(1,10,16,.78)),
    radial-gradient(circle at 18% 15%, rgba(49,225,183,.2), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(255,109,91,.16), transparent 34%),
    repeating-linear-gradient(108deg, transparent 0 28px, rgba(157,255,240,.04) 29px, transparent 31px),
    #071821 !important;
}

body.frogger-deluxe .panel {
  position: relative;
  width: min(1180px, 95vw);
  max-height: 92vh;
  padding: 28px clamp(18px, 3vw, 42px) 24px;
  border: 1px solid rgba(139,255,235,.18) !important;
  border-radius: 26px;
  color: #f3fff9 !important;
  background: linear-gradient(145deg, rgba(7,28,36,.93), rgba(3,17,24,.91)) !important;
  text-shadow: none !important;
  box-shadow: 0 35px 100px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.06);
  scrollbar-color: rgba(112,255,217,.5) transparent;
}

body.frogger-deluxe .panel::before {
  content: "NGUYEN VAN LINH • BLUE HOUR • RMIT BOUND";
  display: block;
  margin-bottom: 8px;
  color: var(--rain-cyan);
  font: 700 9px/1 Manrope, sans-serif;
  letter-spacing: .28em;
  text-align: center;
}

body.frogger-deluxe h1 {
  margin: 0;
  color: var(--rain-cream);
  font: 800 clamp(38px, 5.5vw, 76px)/.9 Barlow Condensed, sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

body.frogger-deluxe .game-kicker {
  margin: 10px 0 20px;
  color: rgba(224,248,241,.7);
  font-size: 12px;
  letter-spacing: .08em;
  text-align: center;
}

body.frogger-deluxe #character-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(104px, 1fr)) !important;
  gap: 10px !important;
  margin-top: 0 !important;
}

body.frogger-deluxe #menu .char-card {
  position: relative;
  min-height: 116px;
  padding: 10px 8px 8px !important;
  border: 1px solid rgba(149,255,239,.12) !important;
  border-radius: 17px !important;
  overflow: hidden;
  background-color: rgba(5,18,25,.82) !important;
  background-image: linear-gradient(155deg, rgba(38,95,99,.42), rgba(5,18,25,.9)) !important;
  background-size: 100% 100% !important;
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}

body.frogger-deluxe .char-card::after {
  content: "CROSS";
  position: absolute;
  top: 8px;
  right: 8px;
  color: rgba(143,255,226,.48);
  font: 700 7px/1 Manrope, sans-serif;
  letter-spacing: .12em;
}

body.frogger-deluxe #menu .char-card:hover,
body.frogger-deluxe #menu .char-card:focus-visible {
  transform: translateY(-4px) !important;
  border-color: rgba(128,255,224,.6) !important;
  outline: none;
  box-shadow: 0 16px 30px rgba(0,0,0,.32), 0 0 22px rgba(75,239,196,.12) !important;
}

body.frogger-deluxe .char-card img {
  width: 88px !important;
  height: 88px !important;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,.48)) saturate(1.05) !important;
}

body.frogger-deluxe .char-card span {
  color: #effff9 !important;
  font: 700 10px/1.1 Manrope, sans-serif !important;
}

body.frogger-deluxe .menu-row { margin-top: 14px; }
body.frogger-deluxe .menu-games { display: none !important; }

body.frogger-deluxe #menu .chip {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(143,255,231,.2) !important;
  color: #edfff9 !important;
  background-color: rgba(105,255,215,.07) !important;
  background-image: none !important;
  font: 700 10px/1 Manrope, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.frogger-deluxe .chip:hover,
body.frogger-deluxe .chip:focus-visible { border-color: var(--rain-cyan); outline: none; }

body.frogger-deluxe #end-controls .chip-primary {
  color: #06231f;
  background: linear-gradient(135deg, var(--rain-cream), var(--rain-cyan));
  border-color: transparent;
  box-shadow: 0 14px 34px rgba(50,233,190,.2);
  background-image: linear-gradient(135deg, var(--rain-cream), var(--rain-cyan)) !important;
}

body.frogger-deluxe #result {
  border: 1px solid rgba(255,122,102,.3);
  border-left-width: 4px;
  border-radius: 12px;
  color: #f3fff9 !important;
  background: rgba(255,102,83,.08) !important;
  text-align: center;
}

body.frogger-deluxe #dmg-top-actions .dmg-btn {
  border-color: rgba(139,255,235,.22) !important;
  color: #edfff9 !important;
  background: rgba(5,25,32,.82) !important;
  box-shadow: 0 9px 28px rgba(0,0,0,.32) !important;
}

@media (max-width: 980px) {
  body.frogger-deluxe #character-grid { grid-template-columns: repeat(5, minmax(94px, 1fr)) !important; }
  body.frogger-deluxe #hud .hud-main { grid-template-columns: 1.25fr repeat(4, .7fr); }
}

@media (max-width: 640px) {
  body.frogger-deluxe .panel { width: 96vw; padding: 20px 12px; border-radius: 20px; }
  body.frogger-deluxe #character-grid { grid-template-columns: repeat(3, minmax(82px, 1fr)) !important; gap: 7px !important; }
  body.frogger-deluxe .char-card { min-height: 104px; }
  body.frogger-deluxe .char-card img { width: 72px !important; height: 72px !important; }
  body.frogger-deluxe #hud { top: 58px; width: calc(100vw - 16px); }
  body.frogger-deluxe #hud .hud-main { grid-template-columns: repeat(4, 1fr); }
  body.frogger-deluxe #hud .title { grid-column: 1 / -1; padding: 7px 12px; text-align: center; }
  body.frogger-deluxe .hud-stat { min-height: 42px; padding: 6px 4px; font-size: 15px; }
  body.frogger-deluxe #hint { bottom: 8px; max-width: calc(100vw - 16px); overflow: hidden; text-overflow: ellipsis; }
}

body.frogger-deluxe.dmg-mobile #hud {
  top: 58px !important;
  left: 50% !important;
  width: calc(100vw - 16px) !important;
  max-width: none !important;
  padding: 0 !important;
  transform: translateX(-50%) !important;
  display: block !important;
}

body.frogger-deluxe.dmg-mobile #hud > * { display: block !important; }
body.frogger-deluxe.dmg-mobile #hud .hud-main { display: grid !important; }
body.frogger-deluxe.dmg-mobile #hud .hud-row { display: contents !important; }

@media (prefers-reduced-motion: reduce) {
  body.frogger-deluxe::after { animation: none; }
  body.frogger-deluxe .char-card,
  body.frogger-deluxe #crossing-callout,
  body.frogger-deluxe #route-progress > i { transition: none !important; }
}
