/*
  Banana â€” Dark Neon Theme (no Tailwind, no inline CSS)
  Mobile-first styles for a clean, maintainable site.
*/

/* Design Tokens â€” Neon Cyan + Purple (Auth screenshot as source of truth) */
:root {
  /* Surfaces */
  --bg-0: #0b1020;
  /* deep dark navy */
  --bg-1: #0f1630;
  /* panels/nav */
  --text-0: #e6e9f1;
  /* primary text */
  --text-1: #c2c8d9;
  /* secondary text */
  --border-0: #1d2645;
  /* subtle borders */

  /* Brand accents */
  --banana-1: #ffd54f;
  /* banana yellow */
  --neon-1: #22d3ee;
  /* neon cyan */
  --neon-2: #8b5cf6;
  /* purple */
  --neon-3: #651fff;
  /* deep purple */
  --neon-4: #22d3ee;
  /* cyan repeat for gradients */

  /* Primary CTA gradient (SIGN IN style) */
  --brand-gradient: linear-gradient(90deg, var(--banana-1), var(--neon-2), var(--neon-3));

  /* Shadows & glow */
  --glow-strong: 0 0 32px rgba(139, 92, 246, 0.45);
  --glow-soft: 0 0 18px rgba(34, 211, 238, 0.35);

  /* Sizing */
  --radius-8: 8px;
  --radius-12: 12px;

  /* Fonts */
  --font-gaming: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

/* Base Reset */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-mono);
  background: var(--bg-0);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(101, 31, 255, 0.12), transparent 60%),
    radial-gradient(800px 400px at 100% 10%, rgba(41, 121, 255, 0.08), transparent 60%),
    repeating-linear-gradient(0deg, rgba(0, 240, 255, 0.06) 0 1px, transparent 1px 100px),
    repeating-linear-gradient(90deg, rgba(41, 121, 255, 0.05) 0 1px, transparent 1px 100px);
  opacity: 0.05;
}

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

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

/* Layout */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: calc(16px + env(safe-area-inset-right));
  background: rgba(11, 16, 32, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22), 0 0 22px rgba(34, 211, 238, 0.06);
  z-index: 120;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header .brand .logo {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 14px rgba(255, 213, 79, 0.25)) drop-shadow(0 0 10px rgba(139, 92, 246, 0.12));
}

.site-header .brand .title {
  font-family: var(--font-gaming);
  font-size: clamp(20px, 4.2vw, 24px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--banana-1);
  text-shadow: 0 0 18px rgba(255, 213, 79, 0.55), 0 0 28px rgba(34, 211, 238, 0.18);
  margin-left: 8px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
  white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .site-header nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-header nav::-webkit-scrollbar {
    display: none;
  }
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  color: rgba(226, 232, 240, 0.78);
  padding: 0 10px;
  border-radius: var(--radius-8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: var(--font-gaming);
  border: 1px solid transparent;
  background: transparent;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.site-header nav a.active {
  color: rgba(255, 213, 79, 0.98);
  background: rgba(255, 213, 79, 0.10);
  border-color: rgba(255, 213, 79, 0.38);
}

.site-header nav a:hover {
  color: var(--text-0);
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.10), rgba(34, 211, 238, 0.08));
  border-color: rgba(34, 211, 238, 0.26);
  box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.08) inset, 0 0 18px rgba(34, 211, 238, 0.10);
}

.site-header nav a:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 2px rgba(34,211,238,0.28), 0 0 14px rgba(139,92,246,0.18);
}

/* Header right-side actions container */
.site-header .header-actions {
  display: none;
}

@media (max-width: 767px) {
  .site-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
}

.page-content {
  padding-top: 58px;
  padding-right: 0;
  padding-left: 0;
  padding-bottom: 24px;
  animation: fadeInUp 420ms ease both;
}

@media (max-width: 767px) {
  .site-header { backdrop-filter: none; }
  .page-content { animation: none; }
  body::before {
    display: none;
  }
  .has-cart .page-content {
    padding-bottom: calc(64px + env(safe-area-inset-bottom) + 120px);
  }
}

@media (min-width: 768px) {
  .has-cart .page-content {
    padding-bottom: 120px;
  }
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 10px 16px;
  border: none;
  border-radius: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  background: var(--bg-1);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.20);
}

.hero::before {
  content: none;
}

.neon-title {
  font-family: var(--font-gaming);
  font-size: clamp(24px, 5.5vw, 36px);
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  color: var(--banana-1);
  text-shadow:
    0 0 16px rgba(255, 213, 79, 0.65),
    0 0 28px rgba(34, 211, 238, 0.35);
}

.hero .subtitle {
  color: var(--text-1);
  font-size: 14px;
}

/* General subtitle utility for consistent spacing across pages */
.subtitle {
  color: var(--text-1);
  font-size: 14px;
  margin: 2px 0 8px;
}

@media (max-width: 767px) {
  body[data-page="home"] .hero-row .hero {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-gaming);
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-12);
  border: 1px solid var(--border-0);
  color: var(--text-0);
  background: #0a1329;
  cursor: pointer;
  text-align: center;
}

.btn i,
.btn .fa-solid {
  font-size: 16px;
  margin: 0;
}

.btn .icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.btn .icon svg,
.btn .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-primary {
  position: relative;
  color: #fff;
  background: var(--brand-gradient);
  border: 2px solid var(--banana-1);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

body[data-page="home"] .hero-row .hero .actions .btn-primary {
  background: var(--banana-1);
  border-color: rgba(250, 204, 21, 0.95);
  color: #111827;
}

body[data-page="home"] .hero-row .hero .actions .btn-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 0 22px rgba(255, 213, 79, 0.28);
}

.btn-ghost {
  background: rgba(10, 19, 41, 0.35);
  border: 1px solid rgba(255, 213, 79, 0.45);
  color: rgba(255, 213, 79, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), 0 0 16px rgba(255, 213, 79, 0.14);
  transition: filter 200ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease, transform 120ms ease;
}

.btn-ghost:hover {
  background: rgba(255, 213, 79, 0.12);
  color: rgba(255, 213, 79, 0.98);
  border-color: rgba(255, 213, 79, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28), 0 0 18px rgba(255, 213, 79, 0.18);
  transform: translateY(-1px);
}

.btn-ghost:active {
  filter: brightness(0.98);
  transform: translateY(0);
}

.btn-ghost:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 0 18px rgba(139, 92, 246, 0.22);
}

/* Buttons â€“ disabled state */
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
}

/* Cards */
.card {
  background: var(--bg-1);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-12);
  padding: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.20);
  transition: box-shadow 160ms ease, transform 160ms ease;
  animation: fadeInUp 380ms ease both;
}

body[data-page="home"] .home-section.card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  animation: none;
}

@media (max-width: 767px) {
  .card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    padding: 0;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    background: var(--bg-1);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Forms */
label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-1);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-8);
  border: 1px solid var(--border-0);
  background: #0a1329;
  color: var(--text-0);
}

textarea {
  min-height: 120px;
  padding: 12px;
}

form .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

form .actions .btn {
  flex: 0 0 auto;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.helper {
  color: var(--text-1);
  font-size: 12px;
}

.error-text {
  color: #f87171;
  font-size: 12px;
}

/* Utility */
.space-md {
  height: 10px;
}

@media (max-width: 767px) {
  .space-md {
    height: 8px;
  }
}

.hidden {
  display: none !important;
}

/* Container for pages that need padding */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

.purchase-result {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 22, 48, 0.96);
  border-top: 1px solid var(--border-0);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
  padding: 16px;
  z-index: 100;
}

.purchase-result .result-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.purchase-result .result-title {
  font-weight: 900;
  letter-spacing: 0.6px;
}

.purchase-result .order-id {
  color: var(--text-1);
  font-size: 12px;
}

.purchase-result .result-items {
  display: grid;
  gap: 8px;
}

.key-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 8px;
  align-items: center;
}

.key-label {
  color: var(--text-1);
  font-size: 12px;
}

.key-value {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  padding: 6px 8px;
  border: 1px solid var(--border-0);
  border-radius: var(--radius-8);
  background: #0a1329;
}

.copy-btn {
  height: 32px;
  padding: 0 10px;
}

@media (max-width: 480px) {
  .key-row {
    grid-template-columns: 1fr;
  }
}

.cart-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(15, 22, 48, 0.92);
  border: 1px solid var(--border-0);
  border-radius: var(--radius-12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
  margin: 8px 0;
  z-index: 95;
}

.cart-summary {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.cart-summary strong {
  font-size: 14px;
}

.cart-bar .btn {
  height: 36px;
}

#cart-purchase-btn {
  background: linear-gradient(135deg, #4176ff 0%, #9c4dff 100%);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  padding: 0 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#cart-purchase-btn:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(156, 77, 255, 0.3);
}

#cart-purchase-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(30%);
  transform: none;
  box-shadow: none;
}

.cart-bar {
  min-height: 60px;
  padding-bottom: env(safe-area-inset-bottom);
  margin-bottom: calc(64px + env(safe-area-inset-bottom));
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 32px;
}

.btn-trash {
  border-color: #f87171;
  color: #f87171;
}

@media (max-width: 480px) {
  .btn-icon {
    height: 28px;
    padding: 0 8px;
  }
}

.cart-details {
  position: relative;
  background: rgba(15, 22, 48, 0.90);
  border: 1px solid var(--border-0);
  border-radius: var(--radius-12);
  padding: 12px 16px;
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

@media (max-width: 1024px) {
  .cart-bar {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Skip to content link for keyboard users */
.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #111a33;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-8);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-0);
}

.skip-link:focus {
  top: 12px;
  z-index: 100;
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55), var(--glow-soft);
}

/* Footer (optional) */
.site-footer {
  text-align: center;
  color: var(--text-1);
  padding: 20px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-1), var(--neon-2));
  opacity: 0.35;
}

.site-footer small {
  display: inline-block;
  background: linear-gradient(90deg, var(--neon-1), var(--neon-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.35));
}

/* Section title â€” professional header (no pill) */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-gaming);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: clamp(16px, 2.4vw, 24px);
  line-height: 1.15;
  color: var(--banana-1);
  position: relative;
  text-shadow: 0 0 14px rgba(255, 213, 79, 0.18);
}

.section-title::before {
  content: "";
  width: 8px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--banana-1), #ff8a00);
  box-shadow: 0 0 14px rgba(255, 179, 0, 0.28);
}


.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
}

.listing-card .section-header-row {
  padding: 0;
}

@media (min-width: 640px) {
  .card .section-header-row {
    padding: 0;
  }
}
.see-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-gaming);
  height: 34px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 900;
  font-size: 12px;
  color: var(--banana-1);
  background: transparent;
  border: 1px solid rgba(255, 213, 79, 0.35);
  border-radius: var(--radius-8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease, color 0.18s ease;
}

.see-more-link::after {
  content: "\2192";
  font-size: 14px;
  line-height: 1;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.see-more-link:hover {
  background: rgba(255, 213, 79, 0.10);
  border-color: rgba(255, 213, 79, 0.78);
  box-shadow: 0 0 18px rgba(255, 213, 79, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.see-more-link:hover::after {
  transform: translateX(2px);
}

.see-more-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.28), 0 0 22px rgba(255, 213, 79, 0.18);
}

@media (max-width: 480px) {
  .see-more-link {
    height: 30px;
    padding: 0 12px;
    font-size: 11px;
  }
}

/* Games cards styles have been isolated.
   See /static/css/games-cards.css for all .grid-games and .games-card rules. */

/* --- Enhancements & Responsive Rules (appended) --- */
/* Responsive nav visibility: bottom nav mobile-only, header links desktop-only */
@media (max-width: 767px) {
  .site-header nav {
    display: none;
  }

  body[data-page="home"] .page-content > .card {
    margin-left: 12px;
    margin-right: 12px;
    border: none;
  }

  body[data-page="home"] .card .section-header-row {
    padding: 12px 6px 8px;
  }

  body[data-page="home"] .card .games-grid {
    padding: 0 6px;
  }

  body[data-page="home"] .home-games-grid > .game-card-link:not(.see-more-card-link):nth-child(n + 7) {
    display: none;
  }

  body[data-page="home"] .home-vouchers-grid > .game-card-link:not(.see-more-card-link):nth-child(n + 7) {
    display: none;
  }

  body[data-page="home"] .see-more-card-link {
    display: none;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none;
  }

  body[data-page="home"] .page-content > .card {
    margin-left: 18px;
    margin-right: 18px;
    border: none;
  }

  body[data-page="home"] .home-games-grid > .game-card-link:not(.see-more-card-link):nth-child(n + 11) {
    display: none;
  }

  body[data-page="home"] .home-vouchers-grid > .game-card-link:not(.see-more-card-link):nth-child(n + 11) {
    display: none;
  }
}

/* Title sizing utilities to avoid inline CSS */
.title-sm {
  font-size: clamp(20px, 5.2vw, 28px);
}

.title-md {
  font-size: clamp(24px, 6.4vw, 36px);
}

.title-lg {
  font-size: clamp(32px, 8vw, 56px);
}

/* Inputs â€“ smart focus/placeholder */
input::placeholder,
textarea::placeholder {
  color: #91a0c6;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
}

.search-input {
  height: 40px;
  flex: 1 1 280px;
  max-width: 560px;
  border-radius: var(--radius-8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(10,19,41,0.95), rgba(10,19,41,0.90));
  color: var(--text-0);
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.search-input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(34,211,238,0.45), 0 0 12px rgba(139,92,246,0.35);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 19, 41, 0.72);
  color: rgba(226, 232, 240, 0.92);
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
}

.chip:hover {
  background: rgba(10, 19, 41, 0.92);
  border-color: rgba(255, 213, 79, 0.55);
  transform: translateY(-1px);
}

.chip.active {
  border-color: rgba(34,211,238,0.55);
  box-shadow: 0 0 0 2px rgba(34,211,238,0.35);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Buttons â€“ hover/focus states */
.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.6);
}

.banner-carousel {
  position: relative;
  width: 100%;
  margin: 0;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border-bottom: 0;
}

.banner-carousel .carousel-track {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  border-radius: 0;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.banner-carousel .carousel-track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  box-shadow:
    inset -2px 0 0 rgba(255, 213, 79, 0.78),
    inset 0 -2px 0 rgba(255, 213, 79, 0.78),
    inset -3px 0 0 rgba(0, 0, 0, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  z-index: 2;
}

@media (max-width: 480px) {
  .banner-carousel .carousel-track {
    min-height: 150px;
  }
}

@media (min-width: 1024px) {
  .banner-carousel .carousel-track {
    aspect-ratio: 20 / 9;
    height: auto;
  }
}

.banner-carousel .carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 320ms ease;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.banner-carousel .carousel-slide.is-active {
  opacity: 1;
}

.banner-carousel .carousel-slide picture,
.banner-carousel .carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
}

/* Ensure SVG guide images are shown fully without cropping */
.banner-carousel .carousel-slide img[src$=".svg"] {
  object-fit: contain;
}

.banner-carousel .carousel-indicators {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.banner-carousel .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
}

.banner-carousel .carousel-indicators button.active {
  background: #fff;
  box-shadow: var(--glow-soft);
}

@media (prefers-reduced-motion: reduce) {
  .banner-carousel .carousel-slide {
    transition: none;
  }
}

@media (min-width: 1024px) {
  .banner-carousel {
    border-radius: 0;
  }

  .banner-carousel .carousel-track {
    border-radius: 0;
  }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }

  .page-content,
  .card {
    animation: none;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Connect banner and hero cleanly, no overlay unit */
/* removed conflicting adjacency overrides */
/* Ensure hero uses the page container width */
.hero {
  margin: 0;
}

.hero .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

form .actions .btn {
  flex: 0 0 auto;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.helper {
  color: var(--text-1);
  font-size: 12px;
}

.error-text {
  color: #f87171;
  font-size: 12px;
}

@media (max-width: 480px) {
  .hero .actions .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
}

/* Mobile Header Hamburger */
.hamburger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 213, 79, 0.42);
  border-radius: var(--radius-8);
  background: rgba(10, 19, 41, 0.92);
  color: var(--text-0);
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hamburger .bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--banana-1);
  border-radius: 2px;
}

.hamburger .bar:nth-child(1) {
  top: 12px;
}

.hamburger .bar:nth-child(2) {
  top: 19px;
}

.hamburger .bar:nth-child(3) {
  top: 26px;
}

.hamburger:hover {
  background: rgba(10, 19, 41, 0.98);
  border-color: rgba(255, 213, 79, 0.72);
  box-shadow: 0 0 16px rgba(255, 213, 79, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hamburger:focus-visible {
  outline: none;
  border-color: rgba(255, 213, 79, 0.88);
  box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.25), 0 0 18px rgba(255, 213, 79, 0.22);
}

.hamburger[aria-expanded="true"] {
  border-color: rgba(255, 213, 79, 0.88);
  box-shadow: 0 0 18px rgba(255, 213, 79, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 767px) {
  .hamburger {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* Mobile Menu Overlay - Professional Animation */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  pointer-events: none;
  transition: visibility 0s 0.3s;
  visibility: hidden;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu.open {
  pointer-events: none;
  visibility: visible;
  transition: visibility 0s 0s;
}

.mobile-menu .menu-backdrop {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 56px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.mobile-menu .menu-panel {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  max-height: calc(100vh - 56px);
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.98), rgba(11, 16, 32, 0.94));
  border-bottom: 1px solid rgba(255, 213, 79, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  border-radius: 0 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 14px;
  overflow: auto;
  transform: translateY(-10px) scale(0.99);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease;
}

.mobile-menu.open .menu-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu .menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 10px;
}

.mobile-menu .menu-title {
  font-family: var(--font-gaming);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 213, 79, 0.96);
}

.mobile-menu .menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 213, 79, 0.35);
  background: rgba(255, 213, 79, 0.08);
  color: rgba(255, 213, 79, 0.95);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mobile-menu .menu-close:hover {
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.55);
  transform: translateY(-1px);
}

.mobile-menu .menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-menu .menu-link:hover,
.mobile-menu .menu-link:focus {
  background: rgba(255, 213, 79, 0.08);
  border-color: rgba(255, 213, 79, 0.28);
  color: rgba(255, 213, 79, 0.98);
}

/* Hero button typography tuning */
.hero .actions .btn {
  font-family: var(--font-gaming);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: none;
}

@media (max-width: 480px) {
  .hero .actions .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
}

/* Desktop hero/banner side-by-side layout */
.hero-row {
  display: grid;
  gap: 0;
  align-items: stretch;
  border-radius: 0;
  /* Remove clipping and borders to eliminate corner rounding/margins */
  overflow: visible;
  border: none;
}

body[data-page="home"] .hero-row {
  margin-bottom: 10px;
}

@media (min-width: 1024px) {
  .hero-row {
    grid-template-columns: 2fr 1fr;
    /* Remove decorative border styling on desktop */
    border: none;
    background-image: none;
    background-origin: initial;
    background-clip: initial;
    box-shadow: none;
  }

  .hero-row .banner-carousel {
    order: 1;
    border-right: none;
    /* Remove desktop divider */
  }

  .hero-row .hero {
    order: 2;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 24px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero .actions {
    justify-content: center;
  }

  /* Desktop footer lines removed */
}

/* Mobile Bottom Navigation (gaming dock) */
@media (max-width: 767px) {
  .page-content {
    padding-bottom: calc(76px + env(safe-area-inset-bottom) + 20px);
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(460px, calc(100% - 24px));
    height: 64px;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(15, 22, 48, 0.88);
    border: 1px solid rgba(255, 213, 79, 0.26);
    box-shadow:
      0 14px 28px rgba(0, 0, 0, 0.52),
      0 0 22px rgba(255, 213, 79, 0.10);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    z-index: 90;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

.mobile-bottom-nav .nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  color: rgba(226, 232, 240, 0.90);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.mobile-bottom-nav .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 213, 79, 0.18);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.mobile-bottom-nav .icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: invert(90%) sepia(10%) saturate(200%) hue-rotate(188deg) brightness(102%) contrast(96%);
  transition: filter 0.18s ease;
}

.mobile-bottom-nav .nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 1;
  font-family: var(--font-gaming);
}

.mobile-bottom-nav .nav-item::after {
  content: "";
  position: absolute;
  inset-inline: 16px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.18s ease;
}

.mobile-bottom-nav .nav-item.active .nav-icon {
  transform: translateY(-3px);
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.70);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.50),
    0 0 18px rgba(255, 213, 79, 0.20);
}

.mobile-bottom-nav .nav-item.active .icon {
  filter: invert(93%) sepia(62%) saturate(1450%) hue-rotate(332deg) brightness(104%) contrast(96%);
}

.mobile-bottom-nav .nav-item.active .nav-label {
  opacity: 1;
  color: rgba(255, 213, 79, 0.95);
}

.mobile-bottom-nav .nav-item:active .nav-icon {
  transform: translateY(-1px) scale(0.97);
}

.mobile-bottom-nav #mobile-buy-trigger.hover .nav-icon,
.mobile-bottom-nav #mobile-buy-trigger:hover .nav-icon {
  transform: translateY(-3px);
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.70);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.50),
    0 0 18px rgba(255, 213, 79, 0.20);
}

.mobile-bottom-nav #mobile-buy-trigger.hover .icon,
.mobile-bottom-nav #mobile-buy-trigger:hover .icon {
  filter: invert(93%) sepia(62%) saturate(1450%) hue-rotate(332deg) brightness(104%) contrast(96%);
}

.mobile-bottom-nav #mobile-buy-trigger.hover .nav-label,
.mobile-bottom-nav #mobile-buy-trigger:hover .nav-label {
  color: rgba(255, 213, 79, 0.95);
}

/* Reusing auth button styles for consistency */
.btn-neon-auth {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 18% 12%, rgba(255, 213, 79, 0.22) 0%, rgba(255, 213, 79, 0.00) 58%),
    radial-gradient(120% 140% at 95% 18%, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0.00) 54%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(11, 16, 32, 0.92) 100%);
  color: rgba(255, 242, 196, 0.98);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 213, 79, 0.72);
  font-family: var(--font-gaming);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 213, 79, 0.16) inset, 0 0 24px rgba(255, 213, 79, 0.16);
}

.btn-neon-auth::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(115deg, transparent 10%, rgba(255, 213, 79, 0.22) 38%, rgba(34, 211, 238, 0.18) 56%, transparent 78%);
  transform: translateX(-55%);
  transition: transform 340ms ease;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.btn-neon-auth > * {
  position: relative;
  z-index: 1;
}

/* Hover effect to keep it feeling interactive */
.btn-neon-auth:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.20) inset, 0 0 22px rgba(34, 211, 238, 0.18);
}

.btn-neon-auth:hover::before {
  transform: translateX(55%);
}

.scroll-to-top-btn {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 19, 41, 0.92);
  border: 2px solid rgba(255, 213, 79, 0.55);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 18px rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--banana-1);
  text-shadow: 0 0 16px rgba(255, 213, 79, 0.40);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, opacity 200ms ease, visibility 200ms ease;
  z-index: 95;
}

.scroll-to-top-btn.hidden-by-payment,
.floating-back-btn.hidden-by-payment {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.scroll-to-top-btn[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .scroll-to-top-btn {
    bottom: calc(18px + env(safe-area-inset-bottom) + 76px);
  }
}

body[data-page^="game_"] .scroll-to-top-btn {
  bottom: calc(18px + env(safe-area-inset-bottom) + 54px);
}

@media (max-width: 767px) {
  body[data-page^="game_"] .scroll-to-top-btn {
    bottom: calc(18px + env(safe-area-inset-bottom) + 76px + var(--payment-bar-fixed-space, 54px));
  }
}

.floating-back-btn {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 19, 41, 0.92);
  border: 2px solid rgba(255, 213, 79, 0.55);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 18px rgba(34, 211, 238, 0.12);
  color: var(--banana-1);
  text-shadow: 0 0 16px rgba(255, 213, 79, 0.40);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  z-index: 94;
}

@media (max-width: 767px) {
  .floating-back-btn {
    bottom: calc(18px + env(safe-area-inset-bottom) + 76px);
  }
}

@media (max-width: 767px) {
  body[data-page^="game_"] .floating-back-btn {
    bottom: calc(18px + env(safe-area-inset-bottom) + 76px + var(--payment-bar-fixed-space, 54px));
  }
}

.floating-back-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.70);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.50), 0 0 18px rgba(255, 213, 79, 0.20);
}

.floating-back-btn:active {
  transform: translateY(1px);
}

.floating-back-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55), 0 14px 34px rgba(0, 0, 0, 0.46);
}

.scroll-to-top-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.70);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.50), 0 0 18px rgba(255, 213, 79, 0.20);
}

.scroll-to-top-btn:active {
  transform: translateY(1px);
}

.scroll-to-top-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55), 0 14px 34px rgba(0, 0, 0, 0.46);
}

.btn-neon-auth:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-neon-auth:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.58), 0 0 0 5px rgba(255, 213, 79, 0.14), 0 18px 44px rgba(255, 179, 0, 0.16);
}

.btn-neon-auth.is-disabled,
.btn-neon-auth:disabled {
  opacity: 0.45;
  /* faded look */
  cursor: not-allowed;
  /* blocked cursor */
  filter: grayscale(30%);
  /* slightly duller */
  transform: none !important;
  /* no float-up */
  box-shadow: none !important;
  /* remove glow */

}

/* Prevent hover when disabled */
.btn-neon-auth.is-disabled:hover,
.btn-neon-auth:disabled:hover {
  box-shadow: none;
  transform: none;
  filter: none;
}


/* Ensure no conflicts with existing .btn classes if mixed */
.hero .actions .btn-neon-auth {
  margin: 0 8px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Forms */
label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-1);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-8);
  border: 1px solid var(--border-0);
  background: #0a1329;
  color: var(--text-0);
}

textarea {
  min-height: 120px;
  padding: 12px;
}

form .actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

form .actions .btn {
  flex: 0 0 auto;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.helper {
  color: var(--text-1);
  font-size: 12px;
}

.error-text {
  color: #f87171;
  font-size: 12px;
}

@media (max-width: 480px) {
  .hero .actions .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
}

/* Mobile Header Hamburger */


/* Buy Game Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

.modal-content {
  background: var(--bg-1);
  border: 1px solid var(--border-0);
  border-radius: var(--radius-12);
  width: 90%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-gaming);
  font-size: 18px;
  color: var(--text-0);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 20px;
  cursor: pointer;
}

.game-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.game-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-8);
  color: var(--text-0);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.game-list li a:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: var(--neon-1);
}

.game-list img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}



/* Buy Menu - Professional Redesign */
.buy-menu-container {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom) + 74px);
  left: 16px;
  right: 16px;
  width: auto;
  max-width: 520px;
  margin: 0 auto;
  max-height: calc(100vh - 56px - 110px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.98), rgba(11, 16, 32, 0.94));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 213, 79, 0.22);
  border-top: 1px solid rgba(255, 213, 79, 0.55);
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 213, 79, 0.14);
  z-index: 96;

  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 767px) {
  .buy-menu-container {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(11, 16, 32, 0.98), rgba(11, 16, 32, 0.94));
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 213, 79, 0.14);
  }
}

/* Stock status pills (voucher/product cards) */
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  user-select: none;
}
.stock-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}
.stock-in {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}
.stock-out {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.12);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buy-menu-container.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.buy-menu-container::after {
  display: none;
}

.buy-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 10px;
}

.buy-menu-title {
  font-family: var(--font-gaming);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 213, 79, 0.96);
}

.buy-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 213, 79, 0.35);
  background: rgba(255, 213, 79, 0.08);
  color: rgba(255, 213, 79, 0.95);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.buy-menu-close:hover {
  background: rgba(255, 213, 79, 0.12);
  border-color: rgba(255, 213, 79, 0.55);
  transform: translateY(-1px);
}

.buy-menu-sections {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.buy-menu-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 213, 79, 0.18);
  border-radius: 18px;
  padding: 10px;
}

.buy-menu-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 213, 79, 0.24);
  background: rgba(255, 213, 79, 0.06);
  font-family: var(--font-gaming);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 213, 79, 0.92);
  cursor: pointer;
}

.buy-menu-section-toggle:hover {
  background: rgba(255, 213, 79, 0.10);
  border-color: rgba(255, 213, 79, 0.34);
}

.buy-menu-section-toggle:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.28), 0 0 14px rgba(139, 92, 246, 0.18);
}

.buy-menu-section-toggle i {
  font-size: 12px;
  color: rgba(255, 213, 79, 0.75);
  transition: transform 160ms ease;
}

.buy-menu-section-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.buy-menu-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: none;
  overflow: hidden;
  padding-right: 0;
  transition: max-height 220ms ease, opacity 180ms ease, margin-top 220ms ease;
  max-height: 1200px;
  opacity: 1;
  min-height: 148px;
}

.buy-menu-list[hidden] {
  display: none !important;
}

.buy-menu-list[data-collapsed="1"] {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.buy-menu-see-more {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(255, 213, 79, 0.06);
  border: 1px solid rgba(255, 213, 79, 0.24);
  color: rgba(255, 213, 79, 0.92);
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.buy-menu-see-more:hover,
.buy-menu-see-more:focus {
  background: rgba(255, 213, 79, 0.10);
  border-color: rgba(255, 213, 79, 0.34);
  color: rgba(255, 213, 79, 0.98);
  transform: translateY(-1px);
  outline: none;
}

.buy-menu-see-more:focus-visible {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.45), 0 0 14px rgba(139, 92, 246, 0.18);
}

.buy-menu-more {
  display: grid;
  gap: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 240ms ease, opacity 200ms ease;
}

.buy-menu-more[data-expanded="1"] {
  max-height: 1200px;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .buy-menu-list,
  .buy-menu-see-more,
  .buy-menu-more {
    transition: none;
  }
}

.buy-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: rgba(226, 232, 240, 0.92);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.buy-menu-link:hover,
.buy-menu-link:focus {
  background: rgba(255, 213, 79, 0.08);
  border-color: rgba(255, 213, 79, 0.28);
  color: rgba(255, 213, 79, 0.98);
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .buy-menu-container {
    display: none !important;
  }
}


/* --- Mobile Fixes --- */

/* Fix for "Banana Credits" text on narrow mobile screens to prevent line break */
@media (max-width: 400px) {
  .title-lg {
    font-size: clamp(24px, 7vw, 32px);
    white-space: nowrap;
  }
}

/* Fix for hero buttons layout on mobile - side by side */
@media (max-width: 480px) {
  .hero .actions {
    display: flex;
    flex-direction: row;
    /* Ensure side-by-side */
    gap: 8px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }

  .hero .actions .btn-neon-auth {
    flex: 1;
    /* Equal width */
    font-size: 11px;
    /* Smaller font */
    padding: 0 8px;
    /* Smaller padding */
    height: 32px;
    /* Further reduced height */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    /* Allow shrinking */
  }

  .hero .actions .btn-neon-auth i {
    font-size: 10px;
  }
}



/* GAME highlight  */
#player-check-result {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 400;
  margin-top: 6px;
  display: inline-block;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.05);
}

/* VALID â€” soft neon green */
#player-check-result.valid_account {
  color: #4ade80;
  /* nice neon-green on dark background */
}

/* INVALID â€” soft red */
#player-check-result.invalid_account {
  color: #f87171;
  /* soft red, readable on #0b1020 */
}


/* SUCCESS OF FAIL TOAST FOR GAME PURCHASE AND OTHERS  */

.alert_message {
  position: fixed;
  top: -80px;
  right: 24px;
  padding: 14px 18px;
  background: rgba(11, 16, 32, 0.95);
  border: 2px solid var(--banana-1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    top 0.35s ease;
}


.alert_message.show {
  opacity: 1;
  top: 80px;
  transform: translateY(0);
}

.alert_message .message {
  margin: 0;
}

.alert_message.success {
  border-color: #00ff88;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.45);
}

/* FAIL â†’ Neon Red */
.alert_message.fail {
  border-color: #ff3b5c;
  box-shadow: 0 0 18px rgba(255, 60, 84, 0.45);
}

.alert_message .message {
  margin: 0;
}


.voucher-modal {
  display: none;
  /* hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 3, 0.6);
  z-index: 9999;
  display: flex;
  /* flex to center content */
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */
  padding: 0;
  /* remove extra top padding */
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Show modal */
.voucher-modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* Modal content slide-in animation */
.voucher-modal .confirm-modal-content {
  background: var(--bg-0);
  color: #fff;
  max-width: 450px;
  margin: 0;
  /* center via flex, not margin */
  border-radius: 12px;
  padding: 25px;
  font-family: var(--font-mono);
  text-align: left;
  transform: translateY(-50px);
  opacity: 0;
  animation: slideIn 0.3s ease forwards;
  border: 1px solid var(--banana-1);
}

/* Slide in keyframes */
@keyframes slideIn {
  0% {
    transform: translateY(-50px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Title */
.voucher-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1em;
  /* neon turquoise */
  font-weight: bold;
  letter-spacing: 1px;
}

/* Modal Details */
.voucher-details p {
  background: var(--bg-1);
  /* darker background */
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  /* align label and value */
  font-family: var(--font-mono);
}


/* Buttons container */
.confirm-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  gap: 15px;
}

/* Cancel Button */
.btn-neon-cancel {
  flex: 1;
  padding: 12px 0;
  border: 2px solid #ff4d4d;
  background: transparent;
  color: #ff4d4d;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  transition: 0.2s all;
}

.btn-neon-cancel:hover {
  box-shadow: 0 0 20px #ff4d4d;
  filter: brightness(1);
}

/* Confirm Button */
.btn-neon-confirm {
  flex: 1;
  padding: 12px 0;
  border: 2px solid #00ff99;
  background: transparent;
  color: #00ff99;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  transition: 0.2s all;
}

.btn-neon-confirm:hover {
  box-shadow: 0 0 20px #00ff99;
  filter: brightness(1.1);
}




/* CSS */
.history-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 6px;
  background: rgba(11, 16, 32, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.90);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.dropdown-menu a:hover {
  background: rgba(10, 19, 41, 0.65);
  border-color: rgba(255, 213, 79, 0.22);
  color: var(--text-0);
}

/* Show dropdown on hover */
.history-dropdown:hover .dropdown-menu {
  display: flex;
  flex-direction: column;
}

.history-dropdown:focus-within .dropdown-menu {
  display: flex;
  flex-direction: column;
}
