/* Ginga Games · neon web game hall */

:root {
  --font-display: "Montserrat", "DM Sans", "Segoe UI", sans-serif;
  --font-body: "DM Sans", "Montserrat", "Segoe UI", sans-serif;

  --color-page: #0b1326;
  --color-page-deep: #060e20;
  --color-page-soft: #131b2e;
  --color-surface: #171f33;
  --color-surface-soft: #222a3d;
  --color-surface-glass: rgba(23, 31, 51, 0.72);
  --color-surface-strong: #2d3449;
  --color-ink: #dae2fd;
  --color-ink-soft: #cbc7ac;
  --color-muted: #949279;
  --color-line: rgba(148, 146, 121, 0.3);
  --color-line-strong: rgba(101, 223, 118, 0.52);
  --color-blue: #eee82c;
  --color-blue-deep: #d1cc00;
  --color-blue-soft: #fbff86;
  --color-sky: #1f2d58;
  --color-mint: #22c55e;
  --color-lime: #86ef84;
  --color-yellow: #f7ff00;
  --color-orange: #f59e0b;
  --color-coral: #f87171;
  --color-pink: #34d399;
  --color-violet: #84cc16;
  --color-red: #fb7185;
  --color-green: #22c55e;
  --color-shadow: rgba(6, 12, 29, 0.72);
  --color-shadow-soft: rgba(6, 12, 29, 0.44);
  --color-backdrop: rgba(4, 8, 22, 0.64);

  --gradient-page: var(--color-page);
  --gradient-surface: linear-gradient(180deg, #171f33, #131b2e);
  --gradient-primary: linear-gradient(120deg, #eee82c 0%, #d1cc00 100%);
  --gradient-hero: linear-gradient(180deg, rgba(11, 19, 38, 0) 0%, rgba(11, 19, 38, 0.72) 58%, rgba(11, 19, 38, 0.98) 100%);
  --gradient-noise: repeating-linear-gradient(135deg, rgba(247, 255, 0, 0.04) 0, rgba(34, 197, 94, 0.04) 1px, transparent 1px, transparent 12px);
  --gradient-art-0: radial-gradient(circle at 28% 22%, var(--color-yellow), transparent 28%), radial-gradient(circle at 78% 76%, var(--color-coral), transparent 34%), linear-gradient(145deg, var(--color-mint), var(--color-yellow));
  --gradient-art-1: radial-gradient(circle at 78% 16%, var(--color-lime), transparent 30%), radial-gradient(circle at 16% 84%, var(--color-blue), transparent 32%), linear-gradient(145deg, var(--color-green), var(--color-mint));
  --gradient-art-2: radial-gradient(circle at 18% 20%, var(--color-yellow), transparent 30%), radial-gradient(circle at 76% 82%, var(--color-lime), transparent 36%), linear-gradient(145deg, var(--color-green), var(--color-sky));
  --gradient-art-3: radial-gradient(circle at 82% 22%, var(--color-blue), transparent 30%), radial-gradient(circle at 18% 82%, var(--color-mint), transparent 34%), linear-gradient(145deg, var(--color-blue-soft), var(--color-green));
  --gradient-art-4: radial-gradient(circle at 22% 18%, var(--color-yellow), transparent 28%), radial-gradient(circle at 82% 76%, var(--color-blue), transparent 34%), linear-gradient(145deg, var(--color-green), var(--color-coral));
  --gradient-art-5: radial-gradient(circle at 74% 18%, var(--color-lime), transparent 28%), radial-gradient(circle at 22% 78%, var(--color-green), transparent 34%), linear-gradient(145deg, var(--color-sky), var(--color-yellow));
  --gradient-art-6: radial-gradient(circle at 24% 24%, var(--color-coral), transparent 28%), radial-gradient(circle at 76% 78%, var(--color-yellow), transparent 34%), linear-gradient(145deg, var(--color-green), var(--color-blue));
  --gradient-art-7: radial-gradient(circle at 78% 20%, var(--color-blue), transparent 30%), radial-gradient(circle at 18% 78%, var(--color-orange), transparent 34%), linear-gradient(145deg, var(--color-green), var(--color-yellow));

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-2: 6px;
  --radius-3: 8px;
  --radius-4: 8px;
  --radius-5: 12px;
  --radius-6: 16px;
  --radius-8: 24px;
  --radius-pill: 999px;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 27px;
  --text-2xl: 40px;
  --text-3xl: 54px;
  --tracking-wide: 0.05em;
  --tracking-tighter: -0.03em;
  --line-tight: 1.08;
  --line-base: 1.7;

  --shadow-soft: 0 18px 44px var(--color-shadow-soft);
  --shadow-card: 0 18px 34px var(--color-shadow);
  --shadow-lift: 0 24px 48px var(--color-shadow);
  --shadow-button: 0 14px 30px rgba(34, 197, 94, 0.24);

  --layout-rail-width: 256px;
  --layout-header-height: 64px;
  --layout-max-width: 1440px;
  --layout-card-min: 160px;
  --layout-trend-width: 240px;
  --layout-drawer-width: 430px;
  --layout-drawer-narrow: 390px;
  --layout-mobile-nav: 72px;

  --motion-fast: 150ms ease;
  --motion-base: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-slow: 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --z-rail: 40;
  --z-header: 35;
  --z-toast: 80;
  --z-drawer: 90;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: var(--line-base);
  font-weight: 400;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 8% 10%, rgba(101, 223, 118, 0.12), transparent 34%), radial-gradient(circle at 82% 0%, rgba(238, 232, 44, 0.1), transparent 30%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.material-symbols-outlined {
  direction: ltr;
  display: inline-block;
  font-family: "Material Symbols Outlined";
  font-feature-settings: "liga";
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}

button {
  border: 0;
  cursor: pointer;
}

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

.hidden { display: none !important; }

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

.side-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-rail);
  display: flex;
  width: var(--layout-rail-width);
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-4);
  border-right: 1px solid var(--color-surface-strong);
  background: var(--color-page-deep);
  box-shadow: 18px 0 44px rgba(0, 0, 0, 0.22);
}

.rail-brand {
  display: grid;
  width: 100%;
  gap: var(--space-1);
  padding: 0 var(--space-2);
}

.rail-brand strong {
  color: var(--color-blue);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  line-height: var(--line-tight);
}

.rail-brand span {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rail-logo,
.brand-badge,
.avatar-bubble {
  display: grid;
  place-items: center;
  border-radius: var(--radius-5);
  background: var(--gradient-primary);
  color: var(--color-surface);
  font-family: var(--font-display);
  box-shadow: var(--shadow-button);
}

.rail-logo {
  width: var(--space-12);
  height: var(--space-12);
  font-size: var(--text-xl);
}

.rail-nav {
  display: grid;
  width: 100%;
  gap: var(--space-2);
}

.rail-footer {
  display: grid;
  width: 100%;
  gap: var(--space-2);
  margin-top: auto;
  border-top: 1px solid var(--color-surface-strong);
  padding-top: var(--space-4);
}

.rail-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  border-radius: var(--radius-5);
  background: transparent;
  color: var(--color-muted);
  padding: 0 var(--space-4);
  transition: transform var(--motion-fast), background var(--motion-fast), color var(--motion-fast);
}

.rail-item span {
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-weight: 900;
}

.rail-item strong {
  font-size: var(--text-sm);
  line-height: var(--line-tight);
}

.rail-item:hover,
.rail-item.is-active {
  background: var(--color-green);
  color: #00320d;
  transform: translateY(calc(var(--space-1) * -1));
}

.rail-play {
  min-height: 68px;
  border-radius: var(--radius-6);
  background: var(--color-blue);
  color: #343200;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  transition: transform var(--motion-fast), filter var(--motion-fast), box-shadow var(--motion-fast);
}

.rail-play:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 30px rgba(238, 232, 44, 0.24);
  transform: translateY(calc(var(--space-1) * -1));
}

.top-shell {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--layout-rail-width);
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--layout-header-height);
  padding: var(--space-2) var(--space-10);
  border-bottom: 1px solid var(--color-surface-strong);
  background: var(--color-surface-soft);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.mobile-menu { display: none; }

.brand,
.top-actions,
.wallet-pill,
.user-pill,
.search-box,
.hero-actions,
.section-title,
.drawer-head,
.profile-card,
.record-row,
.deposit-summary,
.channel-option,
.feature-card {
  display: flex;
  align-items: center;
}

.brand { gap: var(--space-3); }

.brand-badge {
  width: var(--space-12);
  height: var(--space-12);
  font-size: var(--text-xl);
}

.brand-copy strong,
.section-title h2,
.drawer-head h2,
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: var(--tracking-tighter);
}

h1,
h2,
.section-title h2,
.drawer-head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: var(--tracking-tighter);
}

.brand-copy strong {
  display: block;
  font-size: var(--text-lg);
  line-height: var(--line-tight);
}

.brand-copy small,
.eyebrow,
.prompt-label,
.count-badge,
.block-label,
.drawer-note,
.drawer-subtitle,
.api-card,
.record-meta,
.game-meta,
.profile-card span,
.profile-card small,
.wallet-hero p,
.deposit-summary small,
.channel-option span,
.empty-state {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.search-box {
  min-height: var(--space-12);
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line);
  max-width: 520px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}

.search-icon {
  display: grid;
  place-items: center;
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-pill);
  background: rgba(247, 255, 0, 0.14);
  color: var(--color-yellow);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 2px solid transparent;
  outline-offset: 4px;
  background: transparent;
  color: var(--color-ink);
}

.search-box input::placeholder { color: var(--color-muted); }

:where(a, button, input):focus-visible {
  outline: 3px solid rgba(247, 255, 0, 0.76);
  outline-offset: 4px;
}

.game-card:focus-visible,
.trend-card:focus-visible,
.feature-card:focus-visible,
.rail-item:focus-visible,
.rail-logo:focus-visible,
.category-chip:focus-visible,
.drawer-backdrop:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.96), 0 0 0 8px rgba(247, 255, 0, 0.38);
}

.search-clear,
.text-button,
.ghost-button,
.icon-button,
.record-tab,
.amount-option,
.auth-tab {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-ink);
  padding: var(--space-2) var(--space-3);
  transition: transform var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.top-actions {
  justify-content: flex-end;
  gap: var(--space-2);
}

.wallet-pill,
.user-pill,
.login-button,
.primary-button {
  min-height: var(--space-12);
  border-radius: var(--radius-pill);
  transition: transform var(--motion-fast), filter var(--motion-fast), box-shadow var(--motion-fast);
}

.wallet-pill,
.user-pill {
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-surface-strong);
  background: var(--color-page-soft);
  color: var(--color-blue);
}

.wallet-pill span { color: var(--color-muted); }
.wallet-pill span.material-symbols-outlined { color: var(--color-blue); }

.withdraw-button {
  border-width: 2px;
  border-color: var(--color-green);
  background: transparent;
  color: var(--color-green);
  font-weight: 900;
}

.withdraw-button:hover {
  background: var(--color-green);
  color: #002107;
}

.login-button,
.primary-button {
  background: var(--gradient-primary);
  color: var(--color-surface);
  font-weight: 900;
  padding: var(--space-2) var(--space-5);
  box-shadow: var(--shadow-button);
}

.portal-shell {
  width: calc(100% - var(--layout-rail-width));
  max-width: none;
  margin-right: 0;
  margin-left: var(--layout-rail-width);
  padding: calc(var(--layout-header-height) + var(--space-6)) var(--space-10) var(--space-16);
}

.hero-section,
.category-strip,
.content-section {
  max-width: var(--layout-max-width);
  margin-right: auto;
  margin-left: auto;
}

.hero-section {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 400px;
  border-radius: var(--radius-8);
  border: 1px solid rgba(148, 146, 121, 0.28);
  background: var(--color-surface);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-slow);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero-section:hover .hero-visual { transform: scale(1.04); }

.hero-copy,
.hero-prompt,
.content-section,
.drawer-panel,
.profile-card,
.wallet-hero,
.balance-grid article,
.deposit-block,
.api-card,
.guest-panel {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-8);
  background: var(--gradient-surface);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  max-width: 760px;
  min-height: 400px;
  padding: var(--space-12);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-copy::after {
  display: none;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-weight: 900;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.eyebrow .material-symbols-outlined { font-size: 16px; vertical-align: -3px; }

.hero-copy h1 {
  position: relative;
  z-index: 1;
  max-width: 740px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 5vw, 64px);
  line-height: var(--line-tight);
}

.hero-copy p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: var(--space-5) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-lg);
}

.hero-actions {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero-actions .primary-button {
  min-height: 64px;
  border-radius: var(--radius-6);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.hero-actions .primary-button .material-symbols-outlined { transition: transform var(--motion-fast); }
.hero-actions .primary-button:hover .material-symbols-outlined { transform: translateX(4px); }

.share-button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--color-surface-strong);
  border-radius: var(--radius-6);
  background: rgba(11, 19, 38, 0.36);
  color: #fff;
}

.ghost-button { background: var(--color-surface-strong); }

.hero-prompt {
  display: grid;
  align-content: center;
  gap: var(--space-4);
  padding: var(--space-6);
}

.hero-prompt strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--line-tight);
}

.prompt-clouds {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.prompt-clouds button,
.category-chip {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface-strong);
  color: var(--color-ink);
  font-weight: 800;
  padding: var(--space-2) var(--space-4);
  transition: transform var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.featured-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.feature-card {
  position: relative;
  justify-content: space-between;
  overflow: hidden;
  min-height: 180px;
  border-radius: var(--radius-8);
  padding: var(--space-5);
  color: var(--color-ink);
  box-shadow: var(--shadow-card);
  transition: transform var(--motion-base), box-shadow var(--motion-base);
}

.feature-card::before,
.game-art::before,
.trend-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-noise);
  opacity: 0.64;
}

.feature-card-large { grid-column: 1 / -1; }

.feature-art-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--space-16);
  height: var(--space-16);
  border-radius: var(--radius-5);
  background: var(--color-surface-glass);
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

.feature-caption {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  border-radius: var(--radius-pill);
  background: var(--color-surface-glass);
  font-weight: 900;
  padding: var(--space-2) var(--space-3);
}

.art-0 { background: var(--gradient-art-0); }
.art-1 { background: var(--gradient-art-1); }
.art-2 { background: var(--gradient-art-2); }
.art-3 { background: var(--gradient-art-3); }
.art-4 { background: var(--gradient-art-4); }
.art-5 { background: var(--gradient-art-5); }
.art-6 { background: var(--gradient-art-6); }
.art-7 { background: var(--gradient-art-7); }

.category-strip {
  position: sticky;
  top: calc(var(--layout-header-height) + var(--space-6));
  z-index: 20;
  margin: var(--space-5) auto;
}

.category-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface-glass);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar,
.trending-row::-webkit-scrollbar { display: none; }

.category-chip { white-space: nowrap; }

.category-chip.is-active,
.category-chip:hover,
.prompt-clouds button:hover,
.auth-tab.is-active,
.record-tab.is-active,
.amount-option.is-active,
.channel-option.is-active,
.text-button:hover,
.ghost-button:hover {
  border-color: rgba(247, 255, 0, 0.72);
  background: linear-gradient(120deg, rgba(247, 255, 0, 0.92), rgba(34, 197, 94, 0.9));
  color: var(--color-surface);
  box-shadow: 0 0 0 1px rgba(247, 255, 0, 0.42);
}

.content-section {
  margin-top: var(--space-6);
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.section-title {
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-title-sticky {
  position: sticky;
  top: calc(var(--layout-header-height) + var(--space-3));
  z-index: 7;
  padding: var(--space-3) 0;
  background: linear-gradient(180deg, rgba(23, 35, 63, 0.96), rgba(9, 14, 30, 0.84));
  backdrop-filter: blur(12px);
}

.section-title h2,
.drawer-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: var(--text-xl);
  line-height: var(--line-tight);
}

.section-title h2::after {
  content: "";
  display: block;
  width: var(--space-12);
  height: 4px;
  margin-top: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-green);
}

.count-badge {
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  padding: var(--space-2) var(--space-3);
  font-weight: 900;
}

.trending-row {
  display: grid;
  grid-auto-columns: minmax(var(--layout-trend-width), 1fr);
  grid-auto-flow: column;
  gap: var(--space-6);
  overflow-x: auto;
  padding: var(--space-1) var(--space-1) var(--space-3);
  scroll-snap-type: x proximity;
}

.trend-card,
.game-card {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  text-align: left;
}

.trend-card { scroll-snap-align: start; }

.trend-art,
.game-art {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-8);
  background: var(--color-surface-soft);
  box-shadow: none;
  transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
}

.trend-art {
  display: grid;
  aspect-ratio: 3 / 4;
  min-height: 0;
  place-items: center;
  padding: var(--space-4);
}

.game-art {
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
}

.trend-image,
.game-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--motion-slow);
}

.trend-art::after,
.game-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  opacity: 0.9;
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: var(--space-3);
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  transition: opacity var(--motion-fast);
}

.card-play-overlay .material-symbols-outlined {
  color: var(--color-blue);
  font-size: 52px;
}

.card-play-overlay strong {
  border-radius: var(--radius-pill);
  background: var(--color-blue);
  color: #343200;
  padding: var(--space-2) var(--space-5);
  font-weight: 900;
}

.game-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 3;
  border-radius: var(--radius-4);
  background: var(--color-green);
  color: #002107;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 4px var(--space-2);
  text-transform: uppercase;
}

.game-symbol,
.trend-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(var(--space-12), 34%, var(--space-16));
  aspect-ratio: 1;
  border-radius: var(--radius-5);
  background: rgba(11, 19, 38, 0.58);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 4vw, var(--text-2xl));
  box-shadow: var(--shadow-soft);
}

.trend-copy,
.game-copy {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-1) 0;
}

.trend-copy strong,
.game-copy strong {
  overflow: hidden;
  font-size: var(--text-md);
  line-height: var(--line-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.game-meta span:first-child {
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-blue-deep);
  font-weight: 900;
  padding: var(--space-1) var(--space-2);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--layout-card-min), 1fr));
  gap: var(--space-6) var(--space-5);
}

.game-card.is-featured {
  grid-column: span 2;
}

.game-card.is-featured .game-art { aspect-ratio: 1 / 1; }

.game-card:hover .game-art,
.trend-card:hover .trend-art,
.feature-card:hover {
  border-color: var(--color-blue);
  box-shadow: 0 0 24px rgba(238, 232, 44, 0.18);
  transform: translateY(calc(var(--space-2) * -1));
}

.game-card:hover .game-image,
.trend-card:hover .trend-image { transform: scale(1.08); }

.game-card:hover .card-play-overlay,
.trend-card:hover .card-play-overlay { opacity: 1; }

.primary-button:hover,
.login-button:hover,
.wallet-pill:hover,
.user-pill:hover {
  filter: brightness(1.04);
  transform: translateY(calc(var(--space-1) * -1));
}

.primary-button:active,
.login-button:active,
.wallet-pill:active,
.user-pill:active,
.game-card:active .game-art,
.trend-card:active .trend-art,
.feature-card:active,
.category-chip:active,
.rail-item:active {
  transform: translateY(var(--space-1));
}

.loading-card,
.empty-state {
  margin: 0;
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-6);
  background: var(--color-surface-soft);
  padding: var(--space-6);
  text-align: center;
}

.system-toast,
.redirect-toast {
  position: fixed;
  z-index: var(--z-toast);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-6);
  background: var(--color-surface-strong);
  color: var(--color-ink);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.system-toast {
  right: var(--space-5);
  bottom: var(--space-5);
  max-width: 360px;
  padding: var(--space-3) var(--space-4);
}

.redirect-toast {
  top: var(--space-5);
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  width: min(calc(100% - var(--space-8)), 520px);
  padding: var(--space-4);
  transform: translateX(-50%);
}

.redirect-toast strong,
.redirect-toast span { display: block; }

.redirect-toast span { color: var(--color-muted); font-size: var(--text-sm); }

.icon-button,
.redirect-toast button {
  display: grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  padding: 0;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-panel {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  width: min(calc(100% - var(--space-8)), var(--layout-drawer-width));
  overflow-y: auto;
  padding: var(--space-5);
  animation: drawerIn var(--motion-slow) both;
}

.drawer-panel-narrow { width: min(calc(100% - var(--space-8)), var(--layout-drawer-narrow)); }

#depositDrawer .drawer-panel,
#recordsDrawer .drawer-panel {
  width: min(calc(100% - var(--space-8)), 860px);
}

#settingsDrawer .drawer-panel {
  width: min(calc(100% - var(--space-8)), 720px);
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(var(--space-8)); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-handle {
  width: var(--space-10);
  height: var(--space-1);
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-line-strong);
}

.drawer-head {
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.auth-tabs,
.record-tabs,
.channel-grid,
.amount-grid,
.drawer-action-grid,
.balance-grid {
  display: grid;
  gap: var(--space-3);
}

.auth-tabs,
.record-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deposit-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.auth-form {
  display: grid;
  gap: var(--space-3);
}

.social-auth {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.social-login {
  display: grid;
  place-items: center;
  width: 100%;
  justify-content: center;
  min-height: var(--space-12);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-4);
  background: linear-gradient(120deg, rgba(15, 27, 54, 0.88), rgba(23, 35, 64, 0.84));
  color: var(--color-ink);
  font-weight: 700;
  transition: transform var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.social-login.is-facebook {
  background: linear-gradient(120deg, rgba(59, 89, 152, 0.24), rgba(24, 35, 65, 0.84));
}

.social-login:hover {
  border-color: rgba(247, 255, 0, 0.72);
  box-shadow: 0 0 0 1px rgba(247, 255, 0, 0.42), var(--shadow-button);
  transform: translateY(calc(var(--space-1) * -1));
}

.social-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-1) 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.social-divider::before,
.social-divider::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--color-line);
}

.auth-form label {
  display: grid;
  gap: var(--space-2);
  color: var(--color-ink-soft);
  font-weight: 800;
}

.hero-section,
.category-strip,
.content-section,
.drawer-panel {
  animation: fadeLift var(--motion-slow) both;
}

@keyframes fadeLift {
  from { opacity: 0; transform: translateY(var(--space-4)); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form input {
  min-height: var(--space-12);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-4);
  outline: 2px solid transparent;
  outline-offset: 3px;
  background: var(--color-surface-strong);
  color: var(--color-ink);
  padding: 0 var(--space-4);
}

.full-button {
  width: 100%;
  justify-content: center;
}

.drawer-note { margin: var(--space-4) 0 0; }

.profile-card {
  gap: var(--space-4);
  padding: var(--space-4);
}

.avatar-bubble {
  width: var(--space-16);
  height: var(--space-16);
  flex: 0 0 auto;
  font-size: var(--text-xl);
}

.profile-card strong,
.profile-card span,
.profile-card small { display: block; }

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.settings-block,
.settings-danger {
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-8);
  background: var(--color-surface);
  padding: var(--space-5);
}

.settings-block-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.settings-block-head .material-symbols-outlined,
.settings-danger .material-symbols-outlined {
  color: var(--color-blue);
}

.settings-block-head h3 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--line-tight);
}

.settings-profile-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.settings-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 3px solid rgba(238, 232, 44, 0.34);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(238, 232, 44, 0.95), rgba(101, 223, 118, 0.95));
  color: #00320d;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
}

.settings-field {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--color-ink-soft);
  font-weight: 800;
}

.settings-field input,
.settings-field select {
  width: 100%;
  min-height: var(--space-12);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-5);
  outline: 0;
  background: var(--color-page-soft);
  color: var(--color-ink);
  padding: 0 var(--space-4);
}

.settings-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-blue) 50%), linear-gradient(135deg, var(--color-blue) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.settings-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-color: rgba(255, 180, 171, 0.34);
  background: rgba(147, 0, 10, 0.18);
}

.settings-danger strong {
  display: block;
  color: #ffdad6;
}

.settings-danger p {
  margin: var(--space-1) 0 0;
  color: #ffdad6;
  opacity: 0.82;
}

.danger-button {
  flex: 0 0 auto;
  min-height: var(--space-12);
  border-radius: var(--radius-5);
  background: #93000a;
  color: #ffdad6;
  font-weight: 900;
  padding: 0 var(--space-4);
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: auto;
}

.drawer-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-4);
}

.mini-card {
  display: grid;
  gap: var(--space-1);
  min-height: 110px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-6);
  background: var(--color-surface-soft);
  color: var(--color-ink);
  padding: var(--space-4);
  text-align: left;
}

.mini-card span,
.balance-grid span,
.wallet-hero span,
.deposit-summary span,
.block-label { color: var(--color-muted); font-size: var(--text-sm); }

.mini-card strong,
.balance-grid strong,
.wallet-hero strong,
.deposit-summary strong { font-size: var(--text-lg); }

.guest-panel,
.api-card,
.wallet-hero,
.deposit-block,
.deposit-summary {
  margin-top: var(--space-4);
  padding: var(--space-4);
}

.wallet-hero {
  display: grid;
  gap: var(--space-3);
  background: var(--gradient-hero);
}

.compact-wallet {
  margin-top: 0;
  border-color: rgba(238, 232, 44, 0.22);
  background: linear-gradient(135deg, rgba(238, 232, 44, 0.16), rgba(35, 166, 70, 0.16)), var(--color-surface);
}

.wallet-hero strong { font-size: var(--text-2xl); line-height: var(--line-tight); }

.balance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--space-4);
}

.balance-grid article { padding: var(--space-4); }

.channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.channel-option {
  align-items: flex-start;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 96px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-6);
  background: var(--color-surface-soft);
  color: var(--color-ink);
  padding: var(--space-4);
  text-align: left;
}

.payment-methods .channel-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 84px;
}

.payment-methods .channel-option .material-symbols-outlined {
  color: var(--color-blue);
}

.payment-methods .channel-option small {
  grid-column: 2 / -1;
  color: var(--color-muted);
}

.money-input,
.record-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-5);
  background: var(--color-surface);
  padding: var(--space-3);
}

.money-input input,
.record-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-ink);
}

.amount-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.amount-option { min-height: var(--space-12); font-weight: 900; }

.deposit-summary {
  display: grid;
  align-items: flex-start;
  gap: var(--space-1);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-6);
  background: var(--color-surface-soft);
}

.withdraw-preview {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  border: 1px solid rgba(101, 223, 118, 0.28);
  border-radius: var(--radius-6);
  background: rgba(35, 166, 70, 0.08);
  padding: var(--space-4);
}

.withdraw-preview p {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  color: var(--color-ink-soft);
}

.withdraw-preview small { color: var(--color-muted); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.trust-grid article {
  display: grid;
  gap: var(--space-1);
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-6);
  background: var(--color-surface);
  padding: var(--space-4);
}

.trust-grid span { color: var(--color-muted); }

.game-detail-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-6);
  background: var(--color-surface-soft);
}

.game-detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-8);
  background: var(--color-surface-soft);
}

.game-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
}

.game-detail-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
  display: flex;
  gap: var(--space-2);
}

.game-detail-badges span {
  border-radius: var(--radius-4);
  background: var(--color-green);
  color: #002107;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 4px var(--space-2);
  text-transform: uppercase;
}

.game-detail-mark {
  display: grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-4);
  background: var(--gradient-primary);
  color: var(--color-surface);
  font-size: var(--text-lg);
  font-weight: 900;
}

.game-detail-meta {
  display: grid;
  gap: var(--space-1);
}

.game-detail-meta h3 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--line-tight);
}

.game-detail-meta span {
  width: max-content;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-line);
  padding: 4px var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-blue);
}

.game-detail-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--color-ink-soft);
}

.game-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.game-detail-stats article {
  display: grid;
  gap: var(--space-1);
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-6);
  background: var(--color-surface);
  padding: var(--space-3);
}

.game-detail-stats .material-symbols-outlined { color: var(--color-blue); }
.game-detail-stats small { color: var(--color-muted); }
.game-detail-stats strong { color: #fff; }

.game-detail-card + p {
  margin: var(--space-3) 0 var(--space-1);
  color: var(--color-ink-soft);
}

.help-list {
  margin: 0;
  padding: var(--space-3) 0 0 var(--space-4);
  color: var(--color-ink-soft);
  line-height: var(--line-base);
  display: grid;
  gap: var(--space-3);
}

.help-list li {
  padding-left: var(--space-1);
}

.records-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.record-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.record-search { margin-top: 0; }

.record-table {
  overflow: hidden;
  border: 1px solid var(--color-surface-strong);
  border-radius: var(--radius-6);
  background: var(--color-surface);
}

.record-table-head,
.record-table-row {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr 1fr 0.82fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.record-table-head {
  background: var(--color-page-soft);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-table-row + .record-table-row { border-top: 1px solid var(--color-surface-strong); }
.record-table-row span { color: var(--color-ink-soft); }

.record-status {
  width: max-content;
  border-radius: var(--radius-pill);
  background: rgba(101, 223, 118, 0.14);
  color: var(--color-green) !important;
  font-size: var(--text-xs);
  font-weight: 900;
  padding: 4px var(--space-2);
}

.record-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  color: var(--color-muted);
}

.record-page {
  min-width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-4);
  background: var(--color-surface);
  color: var(--color-ink);
}

.record-page.is-active {
  background: var(--color-blue);
  color: #343200;
  font-weight: 900;
}

.record-row {
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-5);
  background: var(--color-surface-soft);
  padding: var(--space-3);
}

.record-title,
.record-meta { display: block; }

.record-amount { font-weight: 900; }
.record-amount.win,
.record-amount.deposit { color: var(--color-green); }
.record-amount.loss { color: var(--color-red); }

.api-card code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .hero-section { grid-template-columns: 1fr 1fr; }
  .hero-copy { grid-column: 1 / -1; min-height: 320px; }
  .featured-mosaic { grid-column: 2; }
}

@media (max-width: 780px) {
  .side-rail {
    top: auto;
    right: var(--space-3);
    bottom: var(--space-3);
    left: var(--space-3);
    width: auto;
    height: var(--layout-mobile-nav);
    flex-direction: row;
    justify-content: center;
    border-radius: var(--radius-pill);
  }

  .rail-brand,
  .rail-footer,
  .rail-logo { display: none; }
  .rail-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rail-item { justify-content: center; min-height: auto; padding: var(--space-1); }
  .rail-item strong { display: none; }

  .top-shell {
    right: var(--space-3);
    left: var(--space-3);
    grid-template-columns: auto 1fr auto;
    border-radius: var(--radius-6);
    padding: var(--space-3);
  }

  .mobile-menu {
    display: grid;
    place-items: center;
    width: var(--space-10);
    height: var(--space-10);
    border-radius: var(--radius-4);
    background: var(--color-surface);
    color: var(--color-ink);
  }

  .search-box { grid-column: 1 / -1; }
  .brand-copy small,
  .wallet-pill span { display: none; }
  .top-actions { gap: var(--space-1); }
  .login-button { padding: var(--space-2) var(--space-3); }

  .portal-shell {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--layout-header-height) + var(--space-16)) var(--space-3) calc(var(--layout-mobile-nav) + var(--space-8));
  }

  .hero-section,
  .featured-mosaic { grid-template-columns: 1fr; }
  .hero-copy { min-height: 0; padding: var(--space-6); }
  .feature-card-large { grid-column: auto; }
  .category-strip { top: calc(var(--layout-header-height) + var(--space-16)); }
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
  .game-card.is-featured { grid-column: span 2; }

  .drawer-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 86dvh;
    border-radius: var(--radius-8) var(--radius-8) 0 0;
    animation-name: drawerUp;
  }

  @keyframes drawerUp {
    from { opacity: 0; transform: translateY(var(--space-8)); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 520px) {
  .hero-copy h1 { font-size: var(--text-2xl); }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card.is-featured { grid-column: span 2; }
  .drawer-action-grid,
  .balance-grid,
  .channel-grid,
  .amount-grid { grid-template-columns: 1fr; }
  .settings-danger,
  .settings-actions { align-items: stretch; flex-direction: column; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .system-toast { right: var(--space-3); bottom: calc(var(--layout-mobile-nav) + var(--space-5)); left: var(--space-3); max-width: none; }
}
