:root {
  --ink: #050806;
  --felt: #0a1710;
  --felt-mid: #0f2217;
  --felt-soft: #14301f;
  --felt-muted: #244533;

  --chalk: #efe9d6;
  --chalk-dim: #a3ae9f;
  --chalk-ghost: #6a7a6c;

  --gold: #c9a24a;
  --gold-deep: #8f7230;

  --surface-1: rgba(10, 23, 16, 0.92);
  --glow-gold: 0 0 24px rgba(201, 162, 74, 0.22);

  --r-xs: 6px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --transition-smooth: all 0.35s var(--ease-out-expo);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 50% 0%, #11271a 0%, #0a1710 55%, #050806 100%);
  background-attachment: fixed;
  color: var(--chalk);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--felt-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--felt-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--chalk-ghost);
}

[hidden] {
  display: none !important;
}

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

.blob-1,
.blob-2,
.blob-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: drift 25s ease-in-out infinite;
}

.blob-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(36, 120, 70, 0.14) 0%, transparent 70%);
  top: -20%;
  left: -15%;
  animation-duration: 28s;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 162, 74, 0.07) 0%, transparent 70%);
  bottom: -15%;
  right: -10%;
  animation-duration: 22s;
  animation-delay: -8s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(36, 120, 70, 0.09) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation-duration: 35s;
  animation-delay: -15s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(40px, -60px) scale(1.08);
  }

  50% {
    transform: translate(-30px, 40px) scale(0.94);
  }

  75% {
    transform: translate(60px, 20px) scale(1.05);
  }
}

.home-button {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--chalk);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  opacity: 0.6;
  transition: var(--transition-smooth);
  z-index: 2000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-button:hover {
  opacity: 1;
  transform: translateX(-5px);
}

.home-button svg {
  transition: transform 0.3s var(--ease-spring);
}

.home-button:hover svg {
  transform: scale(1.1);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-menu {
  padding-top: 0;
  padding-bottom: 56px;
  text-align: center;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.3rem;
}

.subtitle {
  color: var(--chalk-dim);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.01em;
}

.header {
  text-align: center;
  padding: 60px 0 40px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.logo-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 12px rgba(201, 162, 74, 0.4));
  animation: wcBob 3s ease-in-out infinite;
}

@keyframes wcBob {
  0%,
  100% {
    transform: rotate(-5deg) scale(1);
  }

  50% {
    transform: rotate(5deg) scale(1.05);
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-up {
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.animate-up-2 {
  animation: fadeInUp 0.5s var(--ease-out-expo) 0.1s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s var(--ease-spring), filter 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.btn:hover::after {
  opacity: 1;
}

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

.btn-primary {
  background: var(--gold);
  box-shadow: 0 6px 20px rgba(201, 162, 74, 0.25), var(--glow-gold);
}

.btn-ghost {
  background: transparent;
  color: var(--chalk);
  box-shadow: inset 0 0 0 1.5px var(--gold-deep);
}

.btn:disabled {
  background: var(--felt-soft);
  color: var(--chalk-dim);
  box-shadow: inset 0 0 0 1.5px var(--felt-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.money-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--surface-1);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-lg);
  padding: 16px 32px;
  margin-bottom: 24px;
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.money-card {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.money-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--chalk-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.money-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.gs-options {
  background: var(--surface-1);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 40px;
  animation: fadeInUp 0.4s var(--ease-out-expo) both;
}

.gs-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gs-head h2 {
  color: var(--chalk);
}

.gs-head p {
  color: var(--chalk-dim);
  font-size: 14px;
}

.gs-name-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gq-option-label {
  margin-top: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--chalk-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gs-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.gs-choice {
  flex: 1;
  min-width: 120px;
  max-width: 220px;
  display: flex;
  position: relative;
  cursor: pointer;
}

.gs-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.gs-subtab {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
  min-height: 52px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--felt-muted);
  background: var(--felt-mid);
  color: var(--chalk-dim);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.gs-subtab:hover {
  border-color: var(--chalk-ghost);
  color: var(--chalk);
}

.gs-choice input:checked + .gs-subtab {
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.12);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(201, 162, 74, 0.15);
}

.gs-choice input:focus-visible + .gs-subtab {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.gs-choice-icon {
  font-size: 1.6rem;
  line-height: 1.2;
}

.gs-choice-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--chalk-dim);
}

.gs-start-btn {
  align-self: center;
  padding: 14px 40px;
  font-size: 15px;
  gap: 10px;
  margin-top: 12px;
}

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

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--felt-mid);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-md);
  padding: 24px 28px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
}

.game-card:hover {
  border-color: var(--gold-deep);
}

.game-card h3 {
  color: var(--chalk);
}

.game-card p {
  flex: 1;
  color: var(--chalk-dim);
  font-size: 14px;
}

.game-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.info-badge {
  padding: 4px 12px;
  border-radius: 100px;
  border: 1.5px solid var(--gold-deep);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.play-button {
  width: 100%;
}

.gs-preview {
  background: var(--felt-mid);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-md);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gs-preview h3 {
  color: var(--chalk);
  font-size: 1.3rem;
}

.preview-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.info-item {
  padding: 10px 12px;
  background: var(--felt);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-sm);
  text-align: center;
}

.info-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--chalk-dim);
  margin-bottom: 2px;
}

.info-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.menu-footer {
  padding: 0 0 40px;
  text-align: center;
  color: var(--chalk-dim);
  font-size: 14px;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.popup-card {
  background: var(--felt-mid);
  border: 1px solid var(--felt-muted);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out-expo);
}

.popup-overlay.show .popup-card {
  transform: scale(1);
}

.popup-title {
  color: var(--chalk);
}

.popup-message {
  color: var(--chalk-dim);
  font-size: 14px;
}

.popup-button {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .gs-options {
    padding: 24px;
    gap: 20px;
  }

  .header {
    padding: 48px 0 28px;
  }

  .gs-preview {
    padding: 20px;
  }

  .gs-choice {
    min-width: calc(50% - 5px);
    max-width: none;
  }

  .money-display {
    padding: 16px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob-1,
  .blob-2,
  .blob-3,
  .logo-icon {
    animation: none;
  }
}

.audio-controls {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2000;
  display: flex;
  gap: 8px;
}

.audio-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 74, 0.22);
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  color: var(--chalk-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease-spring), filter 0.2s, color 0.2s, border-color 0.2s, background 0.2s;
}

.audio-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
}

.audio-btn:active {
  transform: translateY(0) scale(0.97);
}

.audio-btn.active {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.12);
}

.audio-btn:not(.active)::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.audio-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
