/* WD Games — Game Gallery (Steam-style showcase, PC only)
   Isolated from css/style.css on purpose: own copy of the design tokens
   so this page never breaks (or gets broken by) the main site's stylesheet. */

:root {
  --bg-dark: #0f1115;
  --bg-card: #1c1e26;
  --bg-sheet: #171920;
  --text-primary: #f0f0f5;
  --text-secondary: #9aa0a6;
  --accent: #00d2ff;
  --accent-gradient: linear-gradient(135deg, #00d2ff, #3a7bd5);
  --accent-secondary: #a78bfa;
  --accent-secondary-gradient: linear-gradient(135deg, #a78bfa, #7c3aed);
  --border-color: rgba(255, 255, 255, 0.08);
  --overlay: rgba(0, 0, 0, 0.7);

  --font-main: "Outfit", sans-serif;
  --font-logo: "Russo One", sans-serif;

  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;

  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 99px;

  /* One easing curve used everywhere for standard UI motion, so hover/press/
     panel transitions all feel like the same material instead of a mix of
     ease/linear/ease-out. Bounce/pulse keyframes intentionally use their own
     curve — those are meant to feel different (a "landing", not a glide). */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);

  --threshold-ok: var(--accent-gradient);
  --threshold-warn: linear-gradient(135deg, #ffb020, #ff8a00);
  --threshold-danger: linear-gradient(135deg, #ff4757, #ff6b81);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-x: hidden;
}

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

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

/* Pages with the fixed bottom storage-footer-bar need room at the end of
   the page, and the floating cart widget must sit above it instead of
   overlapping it. */
body.has-footer-bar {
  padding-bottom: 88px;
}

body.has-footer-bar .feature-cart-widget {
  bottom: calc(var(--spacing-lg) + 64px);
}

/* Mandatory storage-type picker, shown once per visit right after the
   loading screen. Blocks interaction with the rest of the page until a
   choice is made. */
body.landing-active {
  overflow: hidden;
}

body.landing-active .gallery-header,
body.landing-active .discover-main,
body.landing-active .storage-footer-bar,
body.landing-active .feature-cart-widget,
body.landing-active .search-fab {
  pointer-events: none;
}

.landing-screen {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-standard), visibility 0.3s var(--ease-standard);
}

.landing-screen.visible {
  opacity: 1;
  visibility: visible;
}

.landing-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 210, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(58, 123, 213, 0.16), transparent 50%),
    rgba(7, 10, 14, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-card {
  position: relative;
  width: min(560px, 100%);
  background: linear-gradient(160deg, rgba(20, 24, 31, 0.98), rgba(12, 15, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.landing-eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.landing-title {
  font-family: var(--font-logo);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.15;
  margin-bottom: 8px;
}

.landing-subtitle {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.landing-storage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.landing-choice-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s var(--ease-standard), border-color 0.2s var(--ease-standard), box-shadow 0.2s var(--ease-standard);
}

.landing-choice-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.landing-choice-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.landing-choice-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border-radius: var(--radius-pill);
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
  .landing-card {
    padding: 20px;
  }
  .landing-choice-label {
    font-size: 0.62rem;
    padding: 4px 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
  }
}

/* Header */

.gallery-header {
  position: sticky;
  top: 0;
  /* Above .feature-cart-backdrop / #filter-dropdown-backdrop (z-index 49) so
     the header — and whichever Kategori/HDD/Size dropdown is open inside it
     — stays sharp while the backdrop blurs everything behind it. */
  z-index: 52;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.gallery-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.gallery-logo {
  font-family: var(--font-logo);
  font-size: 1.2rem;
  white-space: nowrap;
}

.gallery-logo .logo-wd {
  color: var(--accent);
}

/* --- Branded loading screen: covers the page until game metadata is
   actually fetched and rendered, then fades out. --- */
.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 210, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(58, 123, 213, 0.16), transparent 50%),
    var(--bg-dark);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loading-screen.app-loading-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-logo {
  font-family: var(--font-logo);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  display: flex;
  gap: 8px;
}

.app-loading-logo .logo-wd {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent), 0 0 18px var(--accent);
}

.app-loading-logo .logo-games {
  color: var(--text-primary);
  text-shadow: 0 0 6px var(--text-primary);
}

.app-loading-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-right-color: var(--accent-secondary);
  animation: app-loading-spin 0.85s linear infinite;
}

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

.app-loading-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.gallery-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 220px;
  max-width: 640px;
}

.gallery-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.gallery-search {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 8px 16px 8px 36px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  width: 100%;
}

.gallery-search:focus {
  outline: none;
  border-color: var(--accent);
}

/* Search-as-you-type suggestions dropdown */

.search-suggest-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-sheet);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s var(--ease-standard), transform 0.15s var(--ease-standard), visibility 0.15s;
}

.search-suggest-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

.search-suggest-item:hover,
.search-suggest-item.active {
  background: rgba(0, 210, 255, 0.1);
}

.search-suggest-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
}

.search-suggest-info {
  min-width: 0;
  flex: 1;
}

.search-suggest-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggest-title mark {
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.search-suggest-size {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.search-suggest-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.search-suggest-footer {
  display: block;
  width: 100%;
  border: none;
  border-top: 1px solid var(--border-color);
  background: transparent;
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  cursor: pointer;
}

.search-suggest-footer:hover {
  background: rgba(0, 210, 255, 0.08);
}

/* Storage bar (shared by index.html + game.html headers) */

.storage-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg) var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.storage-picker {
  display: flex;
  gap: 8px;
}

.storage-select {
  background: var(--accent-gradient);
  border: none;
  color: #000;
  font-weight: 800;
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.3);
  transition: transform 0.2s ease;
}

.storage-select:hover {
  transform: translateY(-2px);
}

.storage-select:focus {
  outline: none;
}

.storage-select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Custom Kategori/HDD/Size dropdowns — a plain <select>'s open option list
   is rendered by the OS/browser, outside CSS reach, so it can't have a
   backdrop blur behind it. These are button + panel combos instead, driven
   by js/filter-dropdown.js, sharing one full-page blur backdrop (the exact
   same visual treatment as the "Game Terpilih" cart panel's backdrop). */

.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-dropdown-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-dropdown-caret {
  transition: transform 0.2s var(--ease-standard);
  flex-shrink: 0;
}

.filter-dropdown.open .filter-dropdown-caret {
  transform: rotate(180deg);
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-sheet);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s var(--ease-standard), transform 0.18s var(--ease-standard), visibility 0.18s;
  z-index: 5;
}

.filter-dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.filter-dropdown-item:hover {
  background: rgba(0, 210, 255, 0.1);
  color: var(--text-primary);
}

.filter-dropdown-item.active {
  color: var(--accent);
  font-weight: 700;
}

.storage-progress-wrap {
  flex: 1;
  min-width: 200px;
}

.storage-progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.storage-progress-text span {
  color: var(--text-primary);
  font-weight: 700;
}

.storage-progress-text span.text-accent { color: var(--accent); }
.storage-progress-text span.threshold-warn { color: #ffb020; }
.storage-progress-text span.threshold-danger { color: #ff4757; }

.storage-progress-track {
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.storage-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--threshold-ok);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-standard), background 0.4s var(--ease-standard);
}

.storage-progress-fill.threshold-warn {
  background: var(--threshold-warn);
}

.storage-progress-fill.threshold-danger {
  background: var(--threshold-danger);
}

.storage-picker-inline {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

/* Discover layout (hero + genre chips + catalog) */

.discover-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg);
  flex: 1;
}

.discover-top {
  margin-bottom: var(--spacing-lg);
}

.discover-title {
  margin: 0 0 var(--spacing-md);
  font-family: var(--font-logo);
  font-size: 2rem;
  letter-spacing: 0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(0, 210, 255, 0.25);
}

.hero-carousel {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s var(--ease-standard);
}

.hero-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: block;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  /* Ken Burns: slow zoom-in while a slide is the active one. Duration
     matches HERO_ROTATE_MS in js/feature.js. Animating a scale() transform
     on a separate cover-sized layer (rather than animating background-size
     on the slide itself) keeps the image always fully covering the
     carousel — background-size in %, used previously, sized off the
     image's own aspect ratio and could leave an uncovered strip that then
     visibly tiled. */
  transition: transform 3.5s linear;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.12);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-lg) 30% var(--spacing-lg) var(--spacing-lg);
  /* No darkening backdrop over the artwork — legibility for the title/desc
     comes entirely from their own text-shadow below instead. */
}

.hero-slide-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.hero-slide-tags span {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  color: var(--text-primary);
}

.hero-slide-title {
  margin: 0 0 8px;
  font-family: var(--font-logo);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  /* Layered halo instead of a full-bleed overlay — keeps the artwork bright
     while still reading clearly over any background. */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 4px 20px rgba(0, 0, 0, 0.85), 0 0 44px rgba(0, 0, 0, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide-desc {
  margin: 0 0 var(--spacing-md);
  max-width: 480px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 3px 14px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-cta-primary,
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  transition: transform 0.18s var(--ease-standard), background 0.18s var(--ease-standard), border-color 0.18s var(--ease-standard);
}

.hero-cta-primary {
  background: var(--accent-gradient);
  color: #000;
}

.hero-cta-primary:hover {
  transform: translateY(-2px);
}

.hero-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero-cta-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease-standard), background 0.2s var(--ease-standard);
}

.hero-carousel:hover .hero-nav,
.hero-nav:focus-visible {
  opacity: 1;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* Touch devices have no hover state, so the arrows need to just be visible
   — otherwise they're unreachable on mobile, which is most of our traffic. */
@media (hover: none) {
  .hero-nav {
    opacity: 1;
  }
}

.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }

/* Hero thumbnail rail — doubles as slide picker + progress indicator,
   replacing a plain dot row with something that previews what's next. */

.hero-thumbs {
  position: absolute;
  right: var(--spacing-lg);
  bottom: var(--spacing-lg);
  z-index: 2;
  display: flex;
  gap: 8px;
  max-width: 46%;
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-thumbs::-webkit-scrollbar {
  display: none;
}

.hero-thumb {
  position: relative;
  flex: 0 0 84px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background-color: var(--bg-sheet);
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  transition: opacity 0.2s var(--ease-standard), border-color 0.2s var(--ease-standard);
}

.hero-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent 65%);
}

.hero-thumb:hover {
  opacity: 0.85;
}

.hero-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.hero-thumb-label {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  z-index: 1;
}

.hero-thumb-num {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
}

.hero-thumb.active .hero-thumb-num {
  color: var(--accent);
}

.hero-thumb-title {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-title {
  font-size: 1.1rem;
  margin: 0 0 var(--spacing-sm);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}

.section-header-row .section-title {
  margin: 0;
}

.section-heading-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-heading-text .section-title {
  margin: 0;
}

.section-subtitle {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.section-badge {
  display: inline-flex;
  align-self: flex-start;
  background: var(--accent-gradient);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.update-games-title {
  font-size: 1.8rem;
  font-weight: 800;
}

.text-accent {
  color: var(--accent);
}

.section-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.catalog-controls {
  display: flex;
  gap: 8px;
}

.catalog-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  cursor: pointer;
}

.catalog-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Featured This Week */

.featured-week-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.featured-main-card {
  position: relative;
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-card);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.featured-main-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

.featured-main-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--spacing-lg);
}

.featured-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.featured-main-title {
  margin: 0 0 8px;
  font-family: var(--font-logo);
  font-size: 1.6rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.featured-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
}

.featured-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffb020;
  font-weight: 700;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-actions .card-select-btn {
  position: static;
  opacity: 1;
  transform: none;
}

.featured-side-col {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.featured-side-card {
  position: relative;
  flex: 1;
  min-height: 145px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-card);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  transition: transform 0.22s var(--ease-standard);
}

.featured-side-card:hover {
  transform: translateY(-3px);
}

.featured-side-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 70%);
}

.featured-side-content {
  position: relative;
  z-index: 1;
  padding: var(--spacing-md);
}

.featured-side-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.featured-side-size {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Update Games horizontal strip */

.update-scroll-row {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.update-scroll-row::-webkit-scrollbar {
  height: 6px;
}

.update-scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.update-scroll-row::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--radius-pill);
}

.update-scroll-row .gallery-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

.gallery-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
}

.update-card-badge {
  background: var(--accent-gradient);
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Trailer modal */

.trailer-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease-standard), visibility 0.2s;
}

.trailer-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.trailer-modal-box {
  position: relative;
  width: min(900px, 100%);
  transform: scale(0.96);
  transition: transform 0.2s var(--ease-standard);
}

.trailer-modal-backdrop.open .trailer-modal-box {
  transform: scale(1);
}

.trailer-modal-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.trailer-modal-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.trailer-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.trailer-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Storage footer bar */

.storage-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px var(--spacing-lg) 12px;
  background: rgba(23, 25, 32, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
}

.storage-footer-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.storage-footer-text span {
  color: var(--text-primary);
  font-weight: 700;
}

.storage-footer-text span.text-accent { color: var(--accent); }
.storage-footer-text span.threshold-warn { color: #ffb020; }
.storage-footer-text span.threshold-danger { color: #ff4757; }

/* Full catalog grid */

.catalog-section {
  margin-top: var(--spacing-lg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  opacity: 1;
  transition: opacity 0.15s var(--ease-standard);
}

.gallery-grid.grid-transitioning {
  opacity: 0;
}

.gallery-loading,
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.gallery-card {
  display: block;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.22s var(--ease-standard), transform 0.22s var(--ease-standard), box-shadow 0.22s var(--ease-standard);
  opacity: 0;
  animation: card-fade-in 0.4s var(--ease-standard) forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
  will-change: transform;
}

@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.035);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 210, 255, 0.3);
  z-index: 3;
}

.gallery-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(0, 210, 255, 0.35);
}

.gallery-card-img-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-sheet);
  overflow: hidden;
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease, filter 0.22s var(--ease-standard);
}

.gallery-card:hover .gallery-card-img {
  filter: brightness(1.08);
}

.gallery-card-tags {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease-standard), transform 0.2s var(--ease-standard);
  pointer-events: none;
}

.gallery-card:hover .gallery-card-tags {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card-tags span {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.card-select-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Always visible — most customers browse on mobile, where there's no
     hover state to reveal it, so it can't be a hover-only affordance. */
  opacity: 1;
  transform: scale(1);
  transition: background 0.2s var(--ease-standard), border-color 0.2s var(--ease-standard), color 0.2s var(--ease-standard);
}

.card-select-btn:hover {
  border-color: var(--accent);
}

.card-select-btn.selected {
  opacity: 1;
  transform: scale(1);
  background: var(--accent-gradient);
  border-color: transparent;
  color: #000;
}

.card-select-btn-inline {
  position: static;
  flex-shrink: 0;
  width: auto;
  height: auto;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-main);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.card-select-btn-inline:hover {
  border-color: var(--accent);
}

.gallery-card-footer {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gallery-card-footer-info {
  min-width: 0;
  flex: 1 1 auto;
}

.gallery-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-card-size {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Skeleton loading state */

.skeleton-card {
  animation: none;
  opacity: 1;
  pointer-events: none;
}

.skeleton-shimmer {
  position: relative;
  background: var(--bg-sheet);
  overflow: hidden;
}

.skeleton-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer-move 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer-move {
  100% { transform: translateX(100%); }
}

.skeleton-line {
  height: 14px;
  margin: 3px 0;
  border-radius: 4px;
  width: 80%;
}

.gallery-load-more-wrap {
  text-align: center;
  margin-top: var(--spacing-lg);
}

.gallery-load-more {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  cursor: pointer;
}

.gallery-load-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Game detail page (game.html) */

.game-back-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.game-back-link:hover {
  color: var(--accent);
}

.game-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* Media carousel */

.carousel-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.carousel-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 210, 255, 0.9);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.carousel-main:not(.has-video) .carousel-play-btn {
  display: none;
}

.carousel-main.playing .carousel-play-btn,
.carousel-main.playing .carousel-main-img {
  display: none;
}

.carousel-main-video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.carousel-main.playing .carousel-main-video {
  display: block;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-nav.prev {
  left: 12px;
}

.carousel-nav.next {
  right: 12px;
}

.carousel-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.carousel-thumb {
  position: relative;
  flex-shrink: 0;
  width: 140px;
  height: 78px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-thumb.active,
.carousel-thumb:hover {
  border-color: var(--accent);
}

.carousel-thumb-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Title + meta */

.game-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  flex-wrap: wrap;
}

.game-title {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.game-meta-box {
  min-width: 220px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.85rem;
}

.meta-label {
  color: var(--text-secondary);
}

.meta-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* Content grid: about/requirements + sidebar */

.game-content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  align-items: start;
}

.game-section {
  margin-bottom: var(--spacing-lg);
}

.game-section h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin: 0 0 12px;
}

.about-content {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
}

.about-content h2,
.about-content h3,
.about-content .bb_tag {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 16px 0 8px;
}

.about-content img,
.about-content video {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

.about-content a {
  color: var(--accent);
  text-decoration: underline;
}

.about-content ul {
  padding-left: 18px;
}

.requirements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.req-col {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.req-col strong {
  color: var(--text-primary);
}

.req-col ul {
  margin: 4px 0 0;
  padding-left: 18px;
  list-style: disc;
}

.req-flat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.req-flat-list li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

.req-flat-list li:last-child {
  border-bottom: none;
}

.req-empty {
  margin: 0;
}

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  position: sticky;
  top: 90px;
}

.order-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.order-card-size {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  margin: 4px 0 var(--spacing-md);
}

.order-card-facts {
  margin-bottom: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  padding-top: var(--spacing-sm);
}

.select-game-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--bg-sheet);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-family: var(--font-main);
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s var(--ease-standard), color 0.2s var(--ease-standard), transform 0.15s var(--ease-standard);
}

.select-game-btn-top {
  display: none;
  margin-top: var(--spacing-md);
}

.select-game-btn:hover {
  transform: translateY(-1px);
}

.select-game-btn:active {
  transform: scale(0.97);
}

.select-game-btn.selected {
  background: var(--accent-gradient);
  color: #000;
  border-color: transparent;
  animation: select-pulse 0.4s ease;
}

@keyframes select-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.carousel-main-img {
  transition: opacity 0.25s ease;
}

/* Floating search button (index.html only) — hidden until the user scrolls
   down, sits just above the selected-games widget. */

.search-fab {
  position: fixed;
  right: var(--spacing-lg);
  bottom: calc(var(--spacing-lg) + 64px + 64px);
  z-index: 49;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s var(--ease-standard), transform 0.25s var(--ease-standard);
}

.search-fab.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.search-fab-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gradient);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s var(--ease-standard);
}

.search-fab-btn:active {
  transform: scale(0.92);
}

/* Floating selected-games widget (index.html + game.html) */

.feature-cart-widget {
  position: fixed;
  right: var(--spacing-lg);
  bottom: var(--spacing-lg);
  z-index: 50;
}

.feature-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #000;
  border: none;
  font-weight: 800;
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.3);
  transition: transform 0.2s ease;
}

.feature-cart-btn:hover {
  transform: translateY(-2px);
}

.feature-cart-count {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  display: inline-block;
}

.feature-cart-count.pop {
  animation: cart-count-pop 0.35s var(--ease-standard);
}

@keyframes cart-count-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.cart-flyer {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.7);
  z-index: 200;
  pointer-events: none;
  opacity: 1;
  transition: transform 0.6s var(--ease-standard), opacity 0.6s var(--ease-standard);
}

.feature-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-standard), visibility 0.25s;
}

.feature-cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.assistive-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, 85vw);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-sheet);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.25s var(--ease-standard), transform 0.25s var(--ease-standard), visibility 0.25s;
  z-index: 51;
}

.assistive-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.assistive-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.assistive-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
}

.assistive-storage-info {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.assistive-list {
  overflow-y: auto;
  padding: 8px var(--spacing-md);
  flex: 1;
}

.assistive-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 20px 0;
}

.assistive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.assistive-item:last-child {
  border-bottom: none;
}

.assistive-remove-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
}

.assistive-remove-btn:hover {
  color: var(--danger, #ff4757);
}

.feature-cart-cta {
  display: block;
  width: calc(100% - 2 * var(--spacing-md));
  text-align: center;
  margin: var(--spacing-md);
  background: var(--accent-gradient);
  color: #000;
  font-weight: 800;
  font-family: var(--font-main);
  font-size: 0.9rem;
  border: none;
  padding: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s var(--ease-standard);
}

.feature-cart-cta:hover {
  transform: translateY(-2px);
}

.feature-cart-shopee-btn {
  background: var(--accent-secondary-gradient);
  color: #fff;
  margin-top: 0;
}

/* PS2 platform badge on gallery cards */
.ps2-badge {
  background: var(--accent-secondary-gradient);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Toast notifications (copy-to-clipboard feedback) — mirrors css/style.css's
   toast so the confirmation looks identical to the main site's. */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 200;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-error {
  border-left: 4px solid var(--danger, #ff4757);
}

.toast-error svg {
  color: #ff4757;
}

.toast-success {
  border-left: 4px solid var(--accent);
}

.toast-success svg {
  color: var(--accent);
}

/* Motion */

.game-main,
.gallery-main {
  animation: page-fade-in 0.35s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .gallery-card,
  .gallery-card:hover,
  .card-select-btn,
  .game-main,
  .discover-main,
  .storage-progress-fill,
  .assistive-panel,
  .feature-cart-backdrop,
  .hero-slides,
  .hero-slide,
  .hero-slide-bg,
  .hero-nav,
  .cart-flyer,
  .feature-cart-count.pop,
  .select-game-btn.selected,
  .gallery-card-img,
  .gallery-card-tags,
  .featured-side-card,
  .app-loading-spinner {
    animation: none !important;
    transition: none !important;
  }
  .gallery-card:hover {
    transform: none !important;
  }
  .hero-nav {
    opacity: 1 !important;
  }
  .skeleton-shimmer::after {
    animation: none !important;
  }
}

/* Responsive */

@media (max-width: 1024px) {
  .hero-slide-overlay {
    padding-right: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .gallery-header-inner {
    padding: 8px var(--spacing-md);
    gap: var(--spacing-sm);
  }
  .gallery-search-wrap {
    flex-basis: 100%;
    max-width: none;
    order: 4;
  }
  .gallery-search {
    min-width: 0;
    width: 100%;
    /* Mobile Safari/Chrome auto-zoom the whole page on focusing any text
       input smaller than 16px, and don't reliably zoom back out after —
       16px is the documented threshold that suppresses it. */
    font-size: 16px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .hero-carousel {
    aspect-ratio: 16 / 10;
  }
  .hero-slide-title {
    font-size: 1.5rem;
  }
  .hero-slide-desc {
    max-width: 100%;
    -webkit-line-clamp: 2;
  }
  .hero-thumbs {
    /* No thumbnail rail on mobile — the slide itself is swipeable (see
       the touch handlers in js/feature.js), so a separate picker row
       would just be redundant chrome on a short hero. */
    display: none;
  }
  .hero-nav {
    /* Arrows are replaced by direct touch-swipe on mobile. */
    display: none;
  }

  .game-content-grid {
    grid-template-columns: 1fr;
  }
  .order-card {
    position: static;
  }
  .select-game-btn-top {
    display: block;
  }
  .requirements-grid {
    grid-template-columns: 1fr;
  }
  .carousel-thumb {
    width: 100px;
    height: 56px;
  }

  .storage-picker-inline {
    width: 100%;
    flex-wrap: wrap;
  }
  .storage-picker-inline .storage-select {
    flex: 1 1 30%;
    min-width: 90px;
  }
  .storage-bar {
    padding: 0 var(--spacing-md) var(--spacing-sm);
  }
  .storage-picker {
    width: 100%;
  }
  .storage-select {
    flex: 1;
  }
  .storage-progress-wrap {
    width: 100%;
    flex-basis: 100%;
  }

  .update-scroll-row .gallery-card {
    flex-basis: 160px;
  }
  .update-card-badge {
    font-size: 0.56rem;
    padding: 2px 7px;
  }

  .featured-week-grid {
    grid-template-columns: 1fr;
  }
  .featured-main-card {
    min-height: 220px;
  }
  .featured-side-col {
    flex-direction: row;
  }
  .featured-side-card {
    min-height: 130px;
  }
}

@media (max-width: 480px) {
  .discover-main,
  .game-main {
    padding: var(--spacing-md);
  }
  .carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  .carousel-play-btn {
    width: 56px;
    height: 56px;
  }
  .game-title {
    font-size: 1.4rem;
  }
  .hero-slide-overlay {
    padding: var(--spacing-md);
  }
  .hero-slide-title {
    font-size: 1.05rem;
    -webkit-line-clamp: 1;
    margin-bottom: 6px;
  }
  .hero-slide-desc {
    display: none;
  }
  .hero-slide-tags {
    margin-bottom: 6px;
  }
  .hero-slide-tags span {
    font-size: 0.6rem;
    padding: 2px 8px;
  }
  .hero-cta-primary,
  .hero-cta-secondary {
    padding: 7px 14px;
    font-size: 0.74rem;
  }
  .hero-cta-secondary {
    padding: 7px 10px;
  }
  .featured-main-content {
    padding: var(--spacing-md);
  }
  .featured-tag {
    font-size: 0.6rem;
    padding: 2px 8px;
    margin-bottom: 6px;
  }
  .featured-main-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }
  .featured-meta-row {
    font-size: 0.72rem;
    margin-bottom: 8px;
  }
  .featured-side-content {
    padding: var(--spacing-sm);
  }
  .featured-side-title {
    font-size: 0.8rem;
  }
  .featured-side-size {
    font-size: 0.68rem;
  }
  .hero-cta-secondary span.hero-cta-label {
    display: none;
  }
  .hero-carousel {
    aspect-ratio: 4 / 3;
  }
  .feature-cart-widget {
    right: var(--spacing-md);
    bottom: var(--spacing-md);
  }
  body.has-footer-bar .feature-cart-widget {
    bottom: calc(var(--spacing-md) + 70px);
  }
  .search-fab {
    right: var(--spacing-md);
    bottom: calc(var(--spacing-md) + 70px + 60px);
  }
  .assistive-panel {
    width: min(300px, 88vw);
  }
  .storage-footer-bar {
    padding: 8px var(--spacing-md) 10px;
  }
}
