:root {
  color-scheme: dark;
  --bg: #121212;
  --bg-soft: #181818;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.13);
  --text: #fff8ec;
  --muted: #c9c0d0;
  --border: rgba(255, 255, 255, 0.15);
  --pink: #ff78bf;
  --mint: #72f2b4;
  --sky: #6dd9ff;
  --sun: #ffd166;
  --purple: #b995ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
  font-family: "Lexend", "Quicksand", ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(135deg, rgba(255, 120, 191, 0.13), transparent 34%),
    linear-gradient(225deg, rgba(114, 242, 180, 0.11), transparent 36%),
    linear-gradient(0deg, rgba(109, 217, 255, 0.08), transparent 44%);
  opacity: 0.9;
}

body::after {
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 209, 102, 0.11), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(109, 217, 255, 0.1), transparent 26rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.58));
}

.about-page::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(114, 242, 180, 0.15), transparent 24rem),
    radial-gradient(circle at 88% 70%, rgba(255, 120, 191, 0.13), transparent 28rem),
    linear-gradient(145deg, #101010 0%, #151019 52%, #091211 100%);
}

.not-found-page::before {
  background:
    radial-gradient(circle at 50% 28%, rgba(185, 149, 255, 0.18), transparent 22rem),
    radial-gradient(circle at 24% 78%, rgba(109, 217, 255, 0.1), transparent 24rem),
    linear-gradient(145deg, #0a0a0d 0%, #14101c 50%, #080b11 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(14px, 4vw, 36px);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
}

.brand,
.coffee-button,
.btn,
.footer-about,
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand {
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.brand-logo {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 8px 20px rgba(255, 120, 191, 0.28));
  transition: transform 0.24s cubic-bezier(.2, 1.5, .4, 1);
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.08);
}

.brand-name {
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.coffee-button {
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.95), rgba(255, 120, 191, 0.95));
  color: #241408;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(255, 120, 191, 0.2);
  transition: transform 0.2s cubic-bezier(.2, 1.5, .4, 1), box-shadow 0.2s ease;
}

.coffee-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 38px rgba(255, 209, 102, 0.24);
}

.coffee-button svg,
.btn svg,
.social-links svg,
.footer-about svg,
.device-pill svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.content {
  flex: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(14px, 4vw, 34px) 54px;
}

.hero-section {
  min-height: min(620px, calc(100svh - 94px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(270px, 0.7fr);
  align-items: center;
  gap: clamp(24px, 6vw, 70px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-copy h1,
.empty-card h1,
.about-card h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.96;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(3rem, 8vw, 7rem);
}

.wiggle-word {
  display: inline-block;
  color: var(--sun);
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.24);
  animation: friendly-wiggle 3.4s ease-in-out infinite;
}

@keyframes friendly-wiggle {
  0%,
  100% {
    transform: rotate(-1deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(-5px);
  }
}

.hero-copy p:not(.eyebrow),
.about-card p,
.empty-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(.2, 1.5, .4, 1), border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.btn-primary {
  color: #111;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: 0 16px 38px rgba(109, 217, 255, 0.2);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero-toy {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}

.toy-rings {
  position: absolute;
  width: min(360px, 76vw);
  aspect-ratio: 1;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: toy-spin 22s linear infinite;
}

.toy-rings::before,
.toy-rings::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 209, 102, 0.18);
  border-radius: 50%;
}

.toy-rings::before {
  inset: 34px;
}

.toy-rings::after {
  inset: 72px;
  border-color: rgba(114, 242, 180, 0.2);
}

@keyframes toy-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-toy img {
  position: relative;
  z-index: 1;
  width: min(230px, 54vw);
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.38));
  animation: bounce-logo 2.7s ease-in-out infinite;
}

@keyframes bounce-logo {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-14px) scale(1.04);
  }
}

.toy-chip {
  position: absolute;
  z-index: 2;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.chip-one {
  left: 8%;
  top: 22%;
  color: var(--sky);
}

.chip-two {
  right: 3%;
  bottom: 21%;
  color: var(--pink);
}

.section {
  margin-top: clamp(18px, 5vw, 44px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.game-count {
  padding: 8px 12px;
  border: 1px solid rgba(114, 242, 180, 0.25);
  border-radius: var(--radius);
  color: var(--mint);
  background: rgba(114, 242, 180, 0.08);
  font-weight: 900;
}

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

.game-card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: start;
  gap: 14px;
  min-height: 285px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  text-align: left;
  backdrop-filter: blur(16px) saturate(145%);
  transition: transform 0.2s cubic-bezier(.2, 1.5, .4, 1), border-color 0.2s ease, background 0.2s ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.98;
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.1), rgba(9, 9, 11, 0.5) 48%, rgba(9, 9, 11, 0.9)),
    radial-gradient(circle at 15% 18%, rgba(255, 209, 102, 0.22), transparent 36%),
    radial-gradient(circle at 92% 8%, rgba(109, 217, 255, 0.18), transparent 36%);
  pointer-events: none;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 33% 8% 25%;
  z-index: 1;
  border-radius: var(--radius);
  background: rgba(8, 8, 10, 0.74);
  filter: blur(18px);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-7px) scale(1.02);
  border-color: rgba(255, 209, 102, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.065)),
    rgba(255, 255, 255, 0.08);
}

.available-badge,
.game-card-art,
.game-name,
.game-devices {
  position: relative;
  z-index: 2;
}

.game-card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.game-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.52) blur(2.5px);
  transform: scale(1.05);
}

.game-name {
  max-width: 100%;
  align-self: end;
  font-size: clamp(1.12rem, 2vw, 1.36rem);
  line-height: 1.08;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
  overflow-wrap: anywhere;
}

.game-devices {
  display: flex;
  align-self: end;
  justify-content: center;
  gap: 9px;
}

.device-pill {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--sky);
}

.load-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--sun);
  font-weight: 800;
}

.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;
}

.footer {
  border-top: 1px solid var(--border);
  background: rgba(18, 18, 18, 0.82);
  padding: 20px clamp(14px, 4vw, 36px);
}

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.18s cubic-bezier(.2, 1.5, .4, 1), border-color 0.18s ease, color 0.18s ease;
}

.social-links a:hover {
  transform: translateY(-3px) rotate(-3deg);
  border-color: rgba(255, 120, 191, 0.48);
  color: var(--pink);
}

.footer-about {
  gap: 8px;
  color: var(--sun);
  font-weight: 900;
}

.footer-about:hover svg {
  transform: translateX(4px);
}

.footer-about svg {
  transition: transform 0.18s ease;
}

.about-layout,
.empty-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 54px);
}

.about-card,
.empty-card {
  width: min(860px, 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.about-card {
  padding: clamp(24px, 5vw, 54px);
}

.about-card h1,
.empty-card h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.about-card p {
  margin: 18px 0 0;
  max-width: 720px;
}

.coffee-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  margin-top: 34px;
  border: 1px dashed rgba(255, 209, 102, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 209, 102, 0.06);
  overflow: hidden;
}

.coffee-stage .coffee-button {
  position: relative;
  z-index: 2;
}

.arrow {
  position: absolute;
  color: var(--sun);
  animation: point-bounce 1.3s ease-in-out infinite;
}

.arrow svg {
  width: 42px;
  height: 42px;
  stroke-width: 3;
}

.arrow-top {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.arrow-left {
  left: 18%;
  top: 50%;
  color: var(--mint);
}

.arrow-right {
  right: 18%;
  top: 50%;
  color: var(--pink);
}

@keyframes point-bounce {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -8px;
  }
}

.empty-page {
  background: var(--bg);
}

.empty-card {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(26px, 6vw, 60px);
}

.empty-card img {
  width: 94px;
  height: 94px;
  margin-bottom: 18px;
  animation: bounce-logo 2.5s ease-in-out infinite;
}

.empty-card .btn {
  margin-top: 24px;
}

@media (max-width: 840px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-toy {
    min-height: 300px;
  }

  .top-header,
  .game-card,
  .about-card,
  .empty-card,
  .footer {
    backdrop-filter: none;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .social-links {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .top-header {
    padding: 10px 12px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .coffee-button {
    min-height: 42px;
    padding: 0 12px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(2.55rem, 16vw, 4rem);
    line-height: 0.98;
  }

  .hero-toy {
    min-height: 230px;
  }

  .toy-rings {
    width: min(280px, 78vw);
    animation: none;
  }

  .hero-toy img {
    width: min(180px, 50vw);
    animation: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 235px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  }

  .game-card:hover {
    transform: none;
  }

  .about-layout,
  .empty-page {
    align-items: start;
    padding: 16px 12px 24px;
  }

  .about-card,
  .empty-card {
    padding: 22px 16px;
  }

  .about-card h1,
  .empty-card h1 {
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1.02;
  }

  .coffee-stage {
    min-height: 132px;
    margin-top: 24px;
    padding: 16px;
  }

  .coffee-stage .coffee-button {
    width: 100%;
    max-width: 290px;
  }

  .arrow {
    display: none;
  }

  .arrow-left {
    left: 6%;
  }

  .arrow-right {
    right: 6%;
  }
}

@media (max-width: 380px) {
  .brand-name,
  .coffee-button span {
    font-size: 0.92rem;
  }

  .top-header {
    gap: 10px;
  }

  .content {
    padding-inline: 10px;
  }
}

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