
:root {
  color-scheme: dark;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Manrope', 'Inter', system-ui, sans-serif;

  --bg: #08111f;
  --bg-soft: #0c1727;
  --surface: rgba(12, 22, 38, 0.78);
  --surface-strong: rgba(10, 19, 33, 0.9);
  --surface-tint: rgba(255, 255, 255, 0.03);
  --text: #ebf2ff;
  --text-muted: #a7b6cf;
  --heading: #ffffff;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 18px 38px rgba(0, 0, 0, 0.2);
  --radius: 24px;
  --radius-sm: 16px;
  --primary: #66b6ff;
  --secondary: #8f7dff;
  --accent-glow: rgba(102, 182, 255, 0.28);
  --accent-soft: rgba(143, 125, 255, 0.18);
  --header-bg: rgba(8, 17, 31, 0.72);
  --button-text-dark: #07111d;
  --section-alt: rgba(255, 255, 255, 0.02);
}

body[data-page="home"] {
  --primary: #66b6ff;
  --secondary: #8f7dff;
  --accent-glow: rgba(102, 182, 255, 0.28);
  --accent-soft: rgba(143, 125, 255, 0.18);
}

body[data-page="consulting"] {
  --primary: #87a4ff;
  --secondary: #8d7dff;
  --accent-glow: rgba(135, 164, 255, 0.26);
  --accent-soft: rgba(141, 125, 255, 0.18);
}

body[data-page="media"] {
  --primary: #ff9cc3;
  --secondary: #ffc777;
  --accent-glow: rgba(255, 156, 195, 0.2);
  --accent-soft: rgba(255, 199, 119, 0.16);
}

body[data-page="spatial"] {
  --primary: #79e6ff;
  --secondary: #78b8ff;
  --accent-glow: rgba(121, 230, 255, 0.24);
  --accent-soft: rgba(120, 184, 255, 0.18);
}

body[data-page="webdev"] {
  --primary: #7dd8b6;
  --secondary: #68a8ff;
  --accent-glow: rgba(125, 216, 182, 0.22);
  --accent-soft: rgba(104, 168, 255, 0.18);
}

body[data-page="gamedev"] {
  --primary: #ffd36f;
  --secondary: #7eb6ff;
  --accent-glow: rgba(255, 211, 111, 0.2);
  --accent-soft: rgba(126, 182, 255, 0.18);
}

body[data-page="photography"] {
  --primary: #ffb78b;
  --secondary: #ffd6a8;
  --accent-glow: rgba(255, 183, 139, 0.2);
  --accent-soft: rgba(255, 214, 168, 0.16);
}

body.theme-light {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-tint: rgba(14, 23, 37, 0.02);
  --text: #172235;
  --text-muted: #55647e;
  --heading: #0b1220;
  --border: rgba(11, 18, 32, 0.08);
  --border-strong: rgba(11, 18, 32, 0.14);
  --shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 14px 28px rgba(15, 23, 42, 0.08);
  --header-bg: rgba(244, 247, 251, 0.78);
  --button-text-dark: #07111d;
  --section-alt: rgba(10, 19, 33, 0.025);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, var(--accent-glow), transparent 30%),
    radial-gradient(circle at 88% 6%, var(--accent-soft), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 35%),
    var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
  z-index: -1;
}

body.theme-light::before {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(11, 18, 32, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 18, 32, 0.05) 1px, transparent 1px);
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--heading);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.65rem, 6vw, 4.6rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

ul,
ol {
  padding-left: 1.2rem;
}

[id] {
  scroll-margin-top: 6.5rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  background: var(--heading);
  color: #06111d;
  font-weight: 700;
  z-index: 1200;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #04111f;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.brand-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.brand-copy strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.brand-copy span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.desktop-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.65rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: var(--heading);
}

.desktop-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--heading);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle,
.menu-toggle,
.mobile-close {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.menu-toggle:hover,
.mobile-close:hover,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.mobile-close:focus-visible {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--button-text-dark);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.button-secondary {
  color: var(--heading);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.button-small {
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(2, 8, 15, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(22rem, 92vw);
  height: 100vh;
  z-index: 1105;
  padding: 1rem;
  background: var(--surface-strong);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.menu-open .mobile-menu {
  transform: translateX(0);
}

body.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mobile-menu-title {
  font-family: var(--font-heading);
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 800;
}

.mobile-nav {
  display: grid;
  gap: 0.35rem;
}

.mobile-nav a {
  text-decoration: none;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.mobile-home-link {
  margin-bottom: 0.35rem;
}

.mobile-menu-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
}

main {
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.section-alt {
  background: var(--section-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero {
  padding-top: clamp(4.5rem, 8vw, 6.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.82rem;
  font-weight: 800;
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.6rem 0 1.45rem;
}

.hero-pills,
.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-pills li,
.pill-list li {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-panel,
.surface,
.card,
.timeline-step,
.disclaimer-card,
.cta-panel {
  background:
    linear-gradient(180deg, var(--surface-tint), transparent 100%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-panel,
.surface,
.disclaimer-card {
  padding: 1.5rem;
}

.info-stack {
  display: grid;
  gap: 1.1rem;
}

.info-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.info-item h3 {
  margin-bottom: 0.35rem;
}

.info-item p {
  margin-bottom: 0;
}

.info-icon,
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #07111d;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.section-heading {
  max-width: 43rem;
  margin: 0 0 2rem;
}

.section-heading.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.2rem;
}

.card {
  padding: 1.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.card h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.card p {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--text);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 0.88rem;
  height: 0.88rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}

.timeline-single {
  display: grid;
  gap: 1rem;
}

.timeline-step {
  padding: 1.25rem;
}

.step-number {
  margin: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.timeline-step h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.45rem;
}

.timeline-step p:last-child {
  margin-bottom: 0;
}

.disclaimer-card {
  background:
    linear-gradient(135deg, rgba(255, 166, 102, 0.08), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.cta-panel {
  padding: 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 28%, transparent), color-mix(in srgb, var(--secondary) 18%, transparent)),
    var(--surface);
  box-shadow: var(--shadow);
}

.cta-panel p:last-child {
  margin-bottom: 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.88rem 1rem;
  border-radius: 1rem;
  text-decoration: none;
  color: var(--heading);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 700;
  min-height: 3rem;
}

.contact-chip i {
  color: var(--primary);
}

.site-footer {
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 0.95fr);
  gap: 1.5rem;
}

.footer-col h2 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-blurb {
  max-width: 42ch;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--heading);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-links a {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--heading);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--heading);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 900;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.game-demo-shell {
  padding-top: 0;
}

.bounce-description {
  max-width: 42rem;
  margin: 0 auto 1.25em;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .hero-grid,
  .split-grid,
  .cta-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(1180px, calc(100% - 1.25rem));
  }

  .nav-bar {
    min-height: 4.6rem;
  }

  .brand-copy span {
    display: none;
  }

  .section {
    padding: 3.75rem 0;
  }

  .hero {
    padding-top: 3.9rem;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .contact-chip {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .back-to-top,
  .menu-backdrop,
  .mobile-menu,
  .button,
  .theme-toggle,
  .menu-toggle,
  .mobile-close {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* ----- Game demo styles retained from the original site and refined for the redesign ----- */
.game-showcase {
  background: linear-gradient(135deg, #07162b, #0f2342);
  padding: 1.5em 0 2em;
  margin: 0 -1em;
}

@media (max-width: 48em) {
  .game-showcase {
    margin: 0;
    padding: 1.25em 0 1.75em;
  }
}

.section-gap {
  height: 1.5em;
}

/* BOUNCE GAME */
.game-frame {
  position: relative;
  max-width: 74rem;
  margin: 0 auto 2.5rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.85), rgba(230, 240, 255, 0.6));
  border-radius: 1.5rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.game-frame::before,
.game-frame::after {
  content: '';
  position: absolute;
  inset: 0.35rem;
  border-radius: 1.25rem;
  border: 3px solid rgba(17, 63, 120, 0.18);
  pointer-events: none;
}

.game-frame::after {
  inset: 0.85rem;
  border: 2px dashed rgba(18, 90, 160, 0.28);
  border-radius: 1.1rem;
}

.game-frame-caption {
  text-align: center;
  margin: 0 0 1rem;
  font-weight: 600;
  color: #0f2f52;
}

.bounce-section {
  margin: 2em 0;
  text-align: center;
  padding: 0 1em;
}

.bounce-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 0.5em;
}

.bounce-description {
  max-width: 42rem;
  margin: 0 auto 1.25em;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  text-align: center;
}

.bounce-map-selection {
  margin: 0 auto 1.75em;
  width: min(100%, 900px);
}

.bounce-map-selection .map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(9.5rem, 22vw, 12rem), 1fr));
  gap: 0.9rem;
}

.bounce-map-selection .map-button {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.95rem;
  padding: 1rem 1.15rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(150deg, rgba(16, 52, 94, 0.9), rgba(33, 103, 171, 0.9));
  color: #f1f6ff;
  box-shadow:
    0 1.25rem 2.5rem rgba(12, 45, 82, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(9, 30, 55, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
}

.bounce-map-selection .map-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 1.5rem 3rem rgba(12, 45, 82, 0.32);
}

.bounce-map-selection .map-button:focus-visible {
  outline: 3px solid #a7d4ff;
  outline-offset: 3px;
}

.bounce-map-selection .map-button.selected {
  background: linear-gradient(135deg, #1a73e8, #57a0ff);
  color: #fff;
  box-shadow: 0 1.8rem 3.6rem rgba(26, 115, 232, 0.35);
}

.bounce-map-selection .map-button.selected:hover {
  transform: translateY(-3px);
}

.bounce-map-selection .map-button .map-label {
  pointer-events: none;
}

.bounce-map-selection .map-button .map-status {
  width: 1.45em;
  height: 1.45em;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe8a3, #f6c828 60%, #f4a019);
  color: #1f2b3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow:
    0 4px 12px rgba(246, 200, 40, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.bounce-map-selection .map-button.show-status .map-status {
  opacity: 1;
  transform: scale(1);
}

.bounce-map-selection .map-button .map-status-text {
  pointer-events: none;
}

.bounce-map-selection .map-button:disabled {
  cursor: not-allowed;
}

.bounce-map-selection .map-button.locked {
  background: rgba(18, 32, 60, 0.18);
  color: #586585;
  box-shadow: inset 0 0 0 1px rgba(88, 101, 128, 0.35);
  transform: none;
}

.bounce-map-selection .map-button.locked:hover {
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(88, 101, 128, 0.35);
}

.bounce-map-selection .map-button.locked .map-label {
  opacity: 0.92;
}

.bounce-map-selection .map-button.locked .map-status {
  background: linear-gradient(135deg, #15274a, #091427 65%, #040a17);
  color: #d0e4ff;
  box-shadow:
    0 4px 12px rgba(20, 46, 90, 0.45),
    inset 0 0 0 1px rgba(134, 165, 255, 0.35);
}

.bounce-map-selection .map-button.locked .map-status[data-icon='locked'] {
  font-size: 1.05em;
}

.bounce-map-selection .map-button.locked:focus-visible {
  outline-color: #7f9ad6;
}

.bounce-game-wrapper {
  --bounce-ui-bg: rgba(10, 30, 55, 0.92);
  --bounce-ui-text: #f2f7ff;
  --bounce-accent: #4ec1ff;
  position: relative;
  margin: 0 auto;
  width: min(100%, 65rem);
  max-width: 65rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 1.25rem;
  border: 10px solid #d4af37;
  background: linear-gradient(#bfe8ff, #e7f6ff 70%, #ffffff);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.12);
  color: var(--bounce-ui-text);
}

@media (max-width: 700px) {
  .bounce-map-selection .map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .bounce-map-selection {
    width: 100%;
  }

  .bounce-map-selection .map-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.bounce-game-wrapper,
.bounce-game-wrapper * {
  box-sizing: border-box;
}

.bounce-stage-container {
  display: grid;
  place-items: center;
  width: 100%;
}

.bounce-game-wrapper #stage {
  width: min(100%, 900px);
  aspect-ratio: 16 / 9;
  position: relative;
  border-radius: 16px;
  border: 6px solid #d4af37;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.06);
  background: transparent;
  touch-action: none;
}

.bounce-game-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.bounce-game-wrapper #hud {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.75rem);
  pointer-events: none;
  max-width: calc(100% - 24px);
}

.bounce-game-wrapper .pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bounce-ui-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  white-space: nowrap;
  color: var(--bounce-ui-text);
  line-height: 1.2;
  min-width: 0;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bounce-game-wrapper .pill.score-pill {
  background: rgba(4, 18, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15), 0 8px 20px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

.bounce-game-wrapper .pill:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.bounce-game-wrapper .pill:not(:disabled):active {
  transform: scale(0.98);
}

.bounce-game-wrapper .pill:focus-visible {
  outline: 3px solid rgba(64, 180, 255, 0.85);
  outline-offset: 2px;
}

.bounce-game-wrapper .score-pill.is-paused {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 18px rgba(64, 180, 255, 0.55);
}

.bounce-game-wrapper .score-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.bounce-game-wrapper .score-current {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.bounce-game-wrapper .pill b {
  font-weight: 700;
}

.bounce-game-wrapper #overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(1.2rem, 3.5vh, 2.2rem);
  padding: clamp(2.5rem, 9vh, 4rem) clamp(1.5rem, 5vw, 2.5rem);
  background: radial-gradient(1200px 720px at 50% 50%, rgba(6, 22, 44, 0.8), rgba(6, 22, 44, 0.55) 52%, rgba(6, 22, 44, 0.32) 78%);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.bounce-game-wrapper #overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.bounce-game-wrapper #overlay .panel {
  position: relative;
  z-index: 4;
  max-width: min(26rem, 92vw);
  width: 100%;
}

.bounce-game-wrapper #overlay .win-star-wrapper {
  position: relative;
  width: clamp(3.5rem, 9vw, 5.5rem);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12%) scale(0.78);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 4;
}

.bounce-game-wrapper #overlay .win-star-wrapper.show {
  opacity: 1;
  transform: translateY(-18%) scale(0.9);
}

.win-star-glow {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 232, 163, 0.85) 0%, rgba(246, 200, 40, 0.55) 45%, rgba(246, 200, 40, 0) 70%);
  animation: winStarPulse 2.6s ease-in-out infinite;
  filter: blur(0.4px);
}

.win-star-orbit {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 2px solid rgba(246, 200, 40, 0.25);
  border-top-color: rgba(246, 200, 40, 0.9);
  border-right-color: rgba(246, 200, 40, 0.6);
  border-left-color: rgba(246, 200, 40, 0.12);
  animation: winStarOrbit 5s linear infinite;
  box-shadow: 0 0 10px rgba(246, 200, 40, 0.35);
}

.win-star {
  position: relative;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0%, 61% 34%, 98% 36%, 69% 57%, 79% 92%, 50% 73%, 21% 92%, 31% 57%, 2% 36%, 39% 34%);
  background: linear-gradient(145deg, #fff4bd 0%, #fdd86a 38%, #f6c828 68%, #f4a019 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 0 28px rgba(246, 200, 40, 0.5);
  filter: drop-shadow(0 0 12px rgba(246, 200, 40, 0.42));
  animation: winStarFloat 3.6s ease-in-out infinite;
}

.win-star::before,
.win-star::after {
  content: '';
  position: absolute;
  inset: 18%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  opacity: 0.7;
  animation: winStarTwinkle 2.1s ease-in-out infinite;
}

.win-star::after {
  inset: 24%;
  opacity: 0.55;
  animation-delay: 1.05s;
}

@keyframes winStarPulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes winStarOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes winStarTwinkle {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}
.bounce-game-wrapper .panel {
  background: rgba(4, 18, 34, 0.9);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-align: center;
  color: #f4f9ff;
}

.bounce-game-wrapper .big {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.bounce-game-wrapper button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  background: var(--bounce-accent);
  color: #04233c;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(78, 193, 255, 0.35);
}

.bounce-game-wrapper button:hover:not(#restart) {
  background: #72d3ff;
  box-shadow: 0 8px 22px rgba(78, 193, 255, 0.45);
}

.bounce-game-wrapper button:focus-visible {
  outline: 3px solid #9cc4ff;
  outline-offset: 2px;
}

.bounce-game-wrapper #restart {
  padding: 12px 24px;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ffb347, #ffd85f);
  color: #08213a;
  box-shadow:
    0 12px 28px rgba(255, 209, 102, 0.45),
    0 4px 14px rgba(8, 33, 58, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.bounce-game-wrapper #restart:hover,
.bounce-game-wrapper #restart:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px rgba(255, 209, 102, 0.5),
    0 6px 16px rgba(8, 33, 58, 0.4);
  filter: brightness(1.05);
}

@media (max-width: 720px) {
  .bounce-game-wrapper #hud {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .bounce-game-wrapper .pill {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .bounce-game-wrapper #overlay {
    padding: clamp(2.25rem, 11vh, 3.5rem) clamp(1rem, 6vw, 1.75rem);
    gap: clamp(1rem, 4vh, 1.8rem);
  }

  .bounce-game-wrapper #overlay .win-star-wrapper {
    width: clamp(3.75rem, 22vw, 5rem);
    transform: translateY(-10%) scale(0.82);
  }

  .bounce-game-wrapper #overlay .win-star-wrapper.show {
    transform: translateY(-16%) scale(0.94);
  }

  .bounce-map-selection .map-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.65rem;
    justify-items: stretch;
  }

  .bounce-map-selection .map-button {
    padding: 0.85rem 0.95rem;
    font-size: 0.95rem;
    min-width: 0;
    width: 100%;
  }

  .bounce-game-wrapper #hud {
    top: 12px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    max-width: calc(100% - 32px);
    gap: 0.45rem;
  }

  .bounce-game-wrapper .pill {
    width: auto;
    justify-content: center;
  }

  .bounce-game-wrapper #levelWrap {
    gap: 0.35rem;
  }

  .bounce-game-wrapper #levelWrap select {
    min-width: 0;
    width: auto;
    padding-inline: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bounce-game-wrapper #overlay {
    transition: none;
  }
}