:root {
  --ink: #f7fbff;
  --muted: #b9c9de;
  --navy-950: #061226;
  --navy-900: #091a35;
  --navy-800: #102b50;
  --blue: #3da7ff;
  --blue-dark: #1f69de;
  --violet: #6b55ed;
  --yellow: #ffd84b;
  --yellow-dark: #e4a51f;
  --mint: #43e2ae;
  --red: #ff5e72;
  --panel: rgba(12, 31, 61, 0.82);
  --panel-light: rgba(255, 255, 255, 0.1);
  --stroke: rgba(197, 228, 255, 0.22);
  --shadow: 0 28px 65px rgba(0, 8, 27, 0.48);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-top: max(18px, env(safe-area-inset-top));
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
}

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

html {
  min-width: 280px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background: var(--navy-950);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

h1, h2, h3, p {
  margin: 0;
  overflow-wrap: anywhere;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.scene,
.scene-vignette,
.court-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scene {
  z-index: -4;
  background: #08162c url("../assets/library-sport-scene.svg") center / cover no-repeat;
  transform: scale(1.025);
}

.scene-vignette {
  z-index: -3;
  background:
    radial-gradient(circle at 50% 4%, rgba(112, 204, 255, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(2, 9, 22, 0.72), rgba(5, 18, 39, 0.14) 46%, rgba(2, 9, 22, 0.48)),
    linear-gradient(180deg, rgba(4, 13, 29, 0.08), rgba(4, 11, 25, 0.68));
}

.court-lines {
  z-index: -2;
  opacity: 0.28;
  background:
    linear-gradient(90deg, transparent 49.85%, rgba(119, 217, 255, 0.45) 50%, transparent 50.15%),
    radial-gradient(ellipse at 50% 104%, transparent 0 20%, rgba(255, 217, 75, 0.33) 20.2% 20.7%, transparent 21%);
  mask-image: linear-gradient(to bottom, transparent 17%, #000 56%);
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particles i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9efff;
  box-shadow: 0 0 14px #8bd9ff;
  opacity: 0;
  animation: particle-rise 9s linear infinite;
}

.particles i:nth-child(1) { left: 8%; bottom: 8%; animation-delay: 0s; }
.particles i:nth-child(2) { left: 18%; bottom: 4%; animation-delay: 2.4s; width: 3px; height: 3px; }
.particles i:nth-child(3) { left: 36%; bottom: 12%; animation-delay: 5.4s; }
.particles i:nth-child(4) { left: 52%; bottom: 3%; animation-delay: 1.2s; width: 4px; height: 4px; }
.particles i:nth-child(5) { left: 66%; bottom: 9%; animation-delay: 4.2s; }
.particles i:nth-child(6) { left: 78%; bottom: 2%; animation-delay: 6.7s; width: 3px; height: 3px; }
.particles i:nth-child(7) { left: 89%; bottom: 13%; animation-delay: 3.1s; }
.particles i:nth-child(8) { left: 96%; bottom: 5%; animation-delay: 7.5s; width: 4px; height: 4px; }

.app-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--safe-top) clamp(18px, 4vw, 64px) var(--safe-bottom);
  display: flex;
  flex-direction: column;
}

.topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand img {
  width: clamp(48px, 5vw, 64px);
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 12px rgba(0, 7, 24, 0.35));
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-copy small {
  max-width: 100%;
  color: var(--muted);
  font-size: clamp(9px, 0.85vw, 12px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-chip {
  min-width: 0;
  max-width: min(260px, 46vw);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 7px 13px 7px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 26, 52, 0.72);
  box-shadow: 0 14px 30px rgba(1, 9, 27, 0.25), inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.player-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(121, 206, 255, 0.5);
  background: rgba(15, 43, 81, 0.88);
}

.player-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #704a00;
  background: linear-gradient(145deg, #fff79b, var(--yellow));
  box-shadow: inset 0 -4px rgba(158, 96, 5, 0.18), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.player-copy {
  min-width: 0;
  display: grid;
  text-align: left;
}

.player-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-copy strong {
  display: block;
  max-width: 100%;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-layout {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding: clamp(42px, 6vh, 88px) 0 clamp(28px, 5vh, 70px);
}

.home-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.home-layout--single .hero {
  max-width: 820px;
  justify-self: center;
  text-align: center;
}

.home-layout--single .eyebrow,
.home-layout--single .hero-text {
  margin-inline: auto;
}

.home-layout--single .hero-actions,
.home-layout--single .feature-row {
  justify-content: center;
}

.hero {
  min-width: 0;
  max-width: 760px;
  animation: reveal-left 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d8edff;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 216, 75, 0.65);
}

.hero h1 {
  max-width: 100%;
  color: #fff;
  font-size: clamp(54px, 7vw, 112px);
  line-height: 0.88;
  letter-spacing: -0.065em;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 9px 0 rgba(1, 12, 33, 0.22), 0 24px 45px rgba(0, 5, 20, 0.48);
}

.hero h1 span {
  display: inline-block;
  color: var(--yellow);
  -webkit-text-stroke: 1px rgba(255, 249, 189, 0.5);
  text-shadow: 0 8px 0 #b56c13, 0 13px 0 rgba(31, 15, 1, 0.25), 0 22px 38px rgba(0, 0, 0, 0.35);
  transform: rotate(-1deg);
}

.hero-text {
  max-width: 650px;
  margin-top: clamp(24px, 3.4vh, 38px);
  color: #d4e2f2;
  font-size: clamp(15px, 1.45vw, 20px);
  line-height: 1.65;
  font-weight: 600;
}

.hero-actions {
  margin-top: clamp(28px, 4vh, 46px);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
}

.primary-cta {
  min-height: 72px;
  min-width: min(310px, 100%);
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 11px 25px 13px 14px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #59bcff 0%, #2c87ed 62%, #1d63cc 100%);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.3), inset 0 -7px rgba(6, 54, 142, 0.28), 0 14px 0 #102b63, 0 24px 38px rgba(0, 7, 26, 0.38);
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.primary-cta:hover {
  transform: translateY(-4px);
  filter: brightness(1.08);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.3), inset 0 -7px rgba(6, 54, 142, 0.28), 0 18px 0 #102b63, 0 31px 43px rgba(0, 7, 26, 0.45);
}

.primary-cta:active {
  transform: translateY(8px);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.2), inset 0 -4px rgba(6, 54, 142, 0.28), 0 6px 0 #102b63, 0 14px 25px rgba(0, 7, 26, 0.35);
}

.button-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  padding-left: 3px;
  color: #214874;
  background: #f8fdff;
  box-shadow: 0 7px 14px rgba(3, 30, 82, 0.25);
}

.primary-cta > span:last-child {
  min-width: 0;
  display: grid;
  text-align: left;
}

.primary-cta strong,
.primary-cta > span:last-child:not(.button-icon) {
  font-size: 19px;
  font-weight: 900;
}

.primary-cta small {
  margin-top: 2px;
  color: #dcedff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-card {
  min-height: 72px;
  min-width: min(230px, 100%);
  border: 1px solid rgba(255, 226, 111, 0.26);
  border-radius: 22px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(9, 26, 50, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 14px 35px rgba(0, 7, 25, 0.28);
  backdrop-filter: blur(14px);
}

.record-icon {
  font-size: 30px;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.32));
}

.record-card > span:last-child {
  min-width: 0;
  display: grid;
}

.record-card small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.record-card strong {
  margin-top: 3px;
  font-size: 15px;
}

.record-card b {
  color: var(--yellow);
  font-size: 19px;
}

.feature-row {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: #aebfd5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.feature-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feature-row span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(67, 226, 174, 0.8);
}

.game-menu-card {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 570px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(178, 222, 255, 0.28);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(145deg, rgba(22, 61, 104, 0.93), rgba(8, 26, 54, 0.95)),
    rgba(8, 27, 53, 0.9);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.14), inset 0 -1px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px) saturate(1.2);
  animation: reveal-right 0.72s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.game-menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(255, 255, 255, 0.07) 31%, transparent 40%),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.018) 18px 19px);
}

.menu-card-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  top: -120px;
  border-radius: 50%;
  background: rgba(72, 178, 255, 0.32);
  filter: blur(50px);
  pointer-events: none;
}

.menu-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(193, 226, 255, 0.14);
}

.level-badge {
  min-width: 82px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 232, 132, 0.42);
  border-radius: 12px;
  color: #6c4800;
  background: linear-gradient(180deg, #fff39d, var(--yellow));
  box-shadow: inset 0 -4px rgba(179, 111, 3, 0.15), 0 8px 18px rgba(0, 6, 22, 0.24);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.menu-heading > div {
  min-width: 0;
}

.menu-heading p {
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.menu-heading h2 {
  margin-top: 4px;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.menu-grid {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  display: grid;
  gap: 13px;
}

.menu-tile {
  min-width: 0;
  min-height: 79px;
  border: 1px solid rgba(185, 220, 249, 0.15);
  border-radius: 20px;
  padding: 10px 15px 12px 11px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 7, 25, 0.2);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.menu-tile:hover {
  transform: translateX(6px);
  border-color: rgba(126, 206, 255, 0.5);
  background: linear-gradient(180deg, rgba(62, 148, 223, 0.26), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 15px 30px rgba(0, 7, 25, 0.32);
}

.menu-tile--play {
  border-color: rgba(113, 199, 255, 0.4);
  background: linear-gradient(100deg, rgba(51, 151, 235, 0.37), rgba(72, 83, 217, 0.16));
}

.tile-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  padding-left: 3px;
  color: #174776;
  background: linear-gradient(160deg, #eaf8ff, #7bd2ff);
  box-shadow: inset 0 -5px rgba(19, 104, 172, 0.16), 0 9px 15px rgba(0, 5, 20, 0.28);
  font-size: 20px;
  font-weight: 900;
}

.tile-icon--gold {
  color: #7a4b00;
  background: linear-gradient(160deg, #fff9b5, var(--yellow));
}

.tile-icon--violet {
  color: #fff;
  background: linear-gradient(160deg, #b7a8ff, var(--violet));
}

.tile-icon--mint {
  color: #075743;
  background: linear-gradient(160deg, #baffea, var(--mint));
}

.tile-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tile-copy strong {
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 900;
}

.tile-copy small {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
}

.tile-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #eaf7ff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 17px;
  transition: transform 0.18s ease;
}

.menu-tile:hover .tile-arrow {
  transform: translateX(3px);
}

.menu-footer {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #91a8c1;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(67, 226, 174, 0.75);
}

.floating-props {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.prop {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(50, 105, 167, 0.78), rgba(9, 28, 57, 0.78));
  box-shadow: 0 22px 35px rgba(0, 4, 19, 0.34), inset 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.prop span {
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.28));
}

.prop-book {
  width: 82px;
  height: 82px;
  left: 2.5vw;
  bottom: 5vh;
  font-size: 40px;
  transform: rotate(-10deg);
  animation: float-soft 5.8s ease-in-out infinite;
}

.prop-ball {
  width: 94px;
  height: 94px;
  right: 1.8vw;
  bottom: 8vh;
  font-size: 49px;
  transform: rotate(8deg);
  animation: float-soft 6.4s 0.8s ease-in-out infinite;
}

.prop-trophy {
  width: 68px;
  height: 68px;
  right: 4.5vw;
  top: 19vh;
  font-size: 34px;
  transform: rotate(8deg);
  animation: float-soft 5.2s 1.4s ease-in-out infinite;
}

.game-dialog {
  width: min(500px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.game-dialog::backdrop {
  background: rgba(2, 9, 22, 0.76);
  backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease both;
}

.dialog-card {
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - 32px);
  border: 1px solid rgba(177, 220, 255, 0.28);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 38px);
  background: linear-gradient(145deg, #163f70, #081c3b 72%);
  box-shadow: 0 35px 90px rgba(0, 3, 14, 0.62), inset 0 1px rgba(255, 255, 255, 0.12);
  text-align: center;
  animation: modal-pop 0.26s cubic-bezier(0.2, 0.8, 0.25, 1.15) both;
}

.dialog-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: -120px;
  top: -120px;
  border-radius: 50%;
  background: rgba(66, 178, 255, 0.22);
  filter: blur(40px);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  right: 15px;
  top: 15px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.dialog-icon {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  color: #6e4800;
  background: linear-gradient(155deg, #fff8a4, var(--yellow));
  box-shadow: inset 0 -7px rgba(173, 104, 5, 0.15), 0 15px 27px rgba(0, 6, 25, 0.3);
  font-size: 31px;
}

.dialog-kicker {
  position: relative;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dialog-card h2 {
  position: relative;
  margin-top: 7px;
  font-size: clamp(24px, 6vw, 35px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.dialog-card > p:not(.dialog-kicker) {
  position: relative;
  margin: 13px auto 0;
  max-width: 370px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field-label {
  position: relative;
  margin-top: 24px;
  display: block;
  color: #d8e9f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.dialog-card input {
  position: relative;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  border: 1px solid rgba(190, 225, 255, 0.26);
  border-radius: 16px;
  padding: 15px 16px;
  color: #fff;
  background: rgba(2, 14, 32, 0.53);
  box-shadow: inset 0 3px 8px rgba(0, 5, 18, 0.22);
  font-size: 16px;
}

.dialog-card input::placeholder {
  color: #7892ad;
}

.dialog-primary,
.dialog-secondary {
  position: relative;
  width: 100%;
  min-height: 55px;
  margin-top: 14px;
  border-radius: 17px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.dialog-primary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
  background: linear-gradient(180deg, #53b7ff, #2877dc);
  box-shadow: inset 0 2px rgba(255, 255, 255, 0.22), inset 0 -5px rgba(6, 53, 137, 0.24), 0 8px 0 #102d64;
}

.dialog-secondary {
  border: 1px solid rgba(193, 226, 255, 0.18);
  color: #d9e9f8;
  background: rgba(255, 255, 255, 0.07);
}

.dialog-primary:hover,
.dialog-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.info-stat {
  margin-top: 23px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-stat > div {
  min-width: 0;
  border: 1px solid rgba(190, 225, 255, 0.15);
  border-radius: 18px;
  padding: 17px 12px;
  background: rgba(255, 255, 255, 0.07);
}

.info-stat small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.info-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--yellow);
  font-size: clamp(20px, 6vw, 29px);
  font-weight: 900;
}

.settings-list {
  margin-top: 23px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.setting-row {
  min-width: 0;
  border: 1px solid rgba(190, 225, 255, 0.14);
  border-radius: 17px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.065);
}

.setting-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.setting-copy strong {
  font-size: 13px;
}

.setting-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.switch {
  position: relative;
  width: 49px;
  height: 29px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #354c68;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: background 0.18s ease;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 23px;
  height: 23px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: var(--mint);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.page-hide {
  animation: page-out 0.42s ease forwards;
}

.motion-off *,
.motion-off *::before,
.motion-off *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

@keyframes reveal-left {
  from { opacity: 0; transform: translate3d(-34px, 18px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes reveal-right {
  from { opacity: 0; transform: translate3d(36px, 18px, 0) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes float-soft {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -15px; }
}

@keyframes particle-rise {
  0% { opacity: 0; transform: translateY(20px) scale(0.6); }
  15% { opacity: 0.72; }
  75% { opacity: 0.28; }
  100% { opacity: 0; transform: translateY(-78vh) scale(1.3); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes page-out {
  to { opacity: 0; transform: scale(0.985); filter: blur(3px); }
}

@media (max-width: 1120px) {
  .home-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.8fr);
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(52px, 7.4vw, 82px);
  }

  .floating-props {
    opacity: 0.62;
  }
}

@media (max-width: 900px) {
  .app-shell {
    min-height: auto;
  }

  .home-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 42px;
    padding-top: 54px;
  }

  .hero {
    max-width: 700px;
    text-align: center;
    justify-self: center;
  }

  .eyebrow,
  .hero-actions,
  .feature-row {
    justify-content: center;
  }

  .hero-text {
    margin-inline: auto;
  }

  .game-menu-card {
    max-width: 660px;
    justify-self: center;
  }

  .prop-trophy {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-xl: 26px;
  }

  .app-shell {
    padding-inline: 14px;
  }

  .topbar {
    gap: 9px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 46px;
  }

  .brand-copy small {
    display: none;
  }

  .player-chip {
    max-width: 44vw;
    padding-right: 9px;
  }

  .player-avatar {
    width: 35px;
    height: 35px;
    border-radius: 12px;
  }

  .player-copy small {
    display: none;
  }

  .player-copy strong {
    font-size: 12px;
  }

  .home-layout {
    gap: 34px;
    padding-top: 46px;
  }

  .hero h1 {
    font-size: clamp(47px, 15vw, 70px);
    line-height: 0.9;
  }

  .hero h1 span {
    text-shadow: 0 5px 0 #b56c13, 0 9px 0 rgba(31, 15, 1, 0.25), 0 18px 30px rgba(0, 0, 0, 0.35);
  }

  .hero-text {
    font-size: 14px;
    line-height: 1.58;
  }

  .hero-actions {
    align-items: stretch;
  }

  .primary-cta,
  .record-card {
    width: 100%;
    min-width: 0;
  }

  .feature-row {
    margin-top: 30px;
    gap: 10px 16px;
    font-size: 10px;
  }

  .game-menu-card {
    padding: 18px;
  }

  .menu-heading {
    gap: 11px;
    padding-bottom: 18px;
  }

  .level-badge {
    min-width: 72px;
    font-size: 9px;
  }

  .menu-grid {
    margin-top: 16px;
    gap: 10px;
  }

  .menu-tile {
    min-height: 72px;
    grid-template-columns: 48px minmax(0, 1fr) 26px;
    gap: 10px;
    border-radius: 17px;
    padding-right: 10px;
  }

  .tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .tile-copy small {
    font-size: 9px;
  }

  .tile-arrow {
    width: 26px;
    height: 26px;
  }

  .floating-props {
    opacity: 0.35;
  }

  .prop-book {
    width: 62px;
    height: 62px;
    font-size: 31px;
  }

  .prop-ball {
    width: 68px;
    height: 68px;
    font-size: 35px;
  }
}

@media (max-width: 380px) {
  .brand-copy strong {
    font-size: 13px;
  }

  .hero h1 {
    font-size: clamp(42px, 14.5vw, 56px);
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.11em;
  }

  .button-icon {
    width: 42px;
    height: 42px;
  }

  .primary-cta {
    min-height: 66px;
  }

  .primary-cta > span:last-child:not(.button-icon) {
    font-size: 16px;
  }

  .menu-heading h2 {
    font-size: 18px;
  }

  .tile-copy strong {
    font-size: 14px;
  }

  .tile-copy small {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .app-shell {
    padding-top: 12px;
  }

  .brand img {
    width: 48px;
  }

  .home-layout {
    padding-block: 25px 22px;
  }

  .hero h1 {
    font-size: clamp(52px, 6.1vw, 82px);
  }

  .hero-text {
    margin-top: 21px;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .feature-row {
    margin-top: 25px;
  }

  .game-menu-card {
    padding: 24px;
  }

  .menu-heading {
    padding-bottom: 16px;
  }

  .menu-grid {
    margin-top: 15px;
    gap: 9px;
  }

  .menu-tile {
    min-height: 67px;
  }

  .tile-icon {
    width: 47px;
    height: 47px;
  }

  .menu-footer {
    margin-top: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Custom poster-based home screen --- */
.hero--poster {
  max-width: 1180px;
}

.hero-poster-stage {
  margin: 18px auto 0;
  width: min(100%, 980px);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(205, 231, 255, 0.22);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255,255,255,0.1);
  background: rgba(6, 21, 41, 0.72);
}

.hero-poster-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-actions--compact {
  margin-top: 22px;
  justify-content: center;
}

@media (max-width: 720px) {
  .hero-poster-stage {
    border-radius: 22px;
  }
}

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