/* ==========================================================================
   SHIFT. Games - Components (Modern Minimalist Glassmorphism)
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 18px var(--gold-glow);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-key {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-key:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(168, 85, 247, 0.65);
  color: #f3e8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.28);
}


/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-promoted {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--gold-border);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.badge-free {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-genre {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  text-transform: none;
  font-family: var(--font-main);
  font-weight: 500;
}

.badge-platform {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-transform: none;
  font-family: var(--font-main);
  font-weight: 500;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

/* Game Card (Glassmorphic) */
.game-card {
  background: var(--surface-color);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--glass-shadow);
  position: relative;
}

@media (hover: hover) {
  .game-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  }

  .game-card.is-promoted:hover {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.18);
  }
}

.game-card.is-promoted {
  border-color: var(--gold-border);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, var(--surface-color) 100%);
}

.card-media {
  position: relative;
  width: 100%;
  height: 210px;
  background: #0d0d0d;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .card-media img {
  transform: scale(1.05);
}

.card-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #161616, #0a0a0a);
  color: var(--text-muted);
}

.card-media-placeholder svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
}

.card-badge-container {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.game-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.game-card-tagline {
  color: var(--accent-hover);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 14px;
  line-height: 1.4;
}

.game-card-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer-actions {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1fr;
  gap: 8px;
  width: 100%;
}

.card-footer-actions .btn {
  padding: 8px 6px;
  font-size: 0.82rem;
  width: 100%;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@media (max-width: 640px) {
  .card-footer-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .card-footer-actions .btn {
    min-height: 42px;
    font-size: 0.86rem;
    padding: 10px 8px;
  }

  .card-footer-actions .btn-key {
    grid-column: 1 / -1;
    order: 2;
  }

  .card-footer-actions .btn-secondary {
    order: 1;
  }

  .card-footer-actions .btn-primary,
  .card-footer-actions .btn-gold {
    order: 1;
  }
}


.dev-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.dev-info span.dev-name {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Pagination Bar */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 48px 0;
}

.pagination-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 16px var(--accent-glow);
}

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

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-muted);
}

/* Filter & Search Toolbar */
.filter-toolbar {
  background: var(--surface-color);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 16px 24px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input-wrap input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  background: var(--surface-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.filter-select {
  padding: 14px 40px 14px 20px;
  background-color: #121212;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  min-width: 180px;
  transition: var(--transition);
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
}

.filter-select option {
  background-color: #161616;
  color: #ffffff;
  padding: 12px 16px;
}

.filter-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

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

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 28px;
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 14px 24px;
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
  max-width: 460px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.toast.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

@keyframes slide-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Clean Empty State */
.empty-state {
  text-align: center;
  padding: 70px 24px;
  background: var(--surface-color);
  backdrop-filter: var(--glass-backdrop);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  margin: 24px 0;
}

.empty-state-icon {
  margin-bottom: 20px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 24px;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ==========================================================================
   Universal Form Controls & Inputs (Spacious, Roomy & Modern)
   ========================================================================== */
.form-group {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.form-label span.req {
  color: var(--accent-color);
  margin-left: 3px;
}

.form-input,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  min-height: 50px;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.98rem;
  transition: var(--transition);
  outline: none;
  color-scheme: dark;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: #18181b;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-select {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 44px 14px 18px;
  min-height: 50px;
  background-color: #141416;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.98rem;
  transition: var(--transition);
  outline: none;
  color-scheme: dark;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
}

.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-select option {
  background-color: #18181b;
  color: #ffffff;
  padding: 12px 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-helper {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Key Request Modal Components */
.key-modal-card {
  max-width: 640px !important;
  width: 100%;
}

.key-game-spotlight {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.key-game-thumb {
  width: 72px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.key-game-spotlight-content {
  flex: 1;
  min-width: 0;
}

.key-game-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.key-game-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}

.key-game-dev {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================

   Mobile Components Overrides
   ========================================================================== */
@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 36px;
  }

  .card-media {
    height: 190px;
  }

  .card-body {
    padding: 18px 16px;
  }

  .game-card-title {
    font-size: 1.25rem;
  }

  /* Filter toolbar full width on mobile */
  .filter-toolbar {
    padding: 16px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrap {
    min-width: 100%;
    width: 100%;
  }

  .filter-select {
    width: 100%;
    min-width: 100%;
  }

  /* Modal bottom-sheet on mobile */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    border-radius: 22px 22px 0 0;
    max-height: 94vh;
    border-bottom: none;
    transform: translateY(30px);
  }

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

  .modal-header {
    padding: 20px 18px;
  }

  .modal-header h2 {
    font-size: 1.35rem;
  }

  .modal-body {
    padding: 18px;
  }

  .modal-body img {
    max-height: 200px !important;
  }

  .modal-footer {
    padding: 16px 18px;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  /* Touch-friendly pagination */
  .pagination-container {
    gap: 6px;
    margin: 32px 0;
  }

  .pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 0.85rem;
  }

  /* Mobile Toast */
  .toast-container {
    bottom: 20px;
    right: 16px;
    left: 16px;
    max-width: none;
  }

  .toast {
    min-width: 0;
    width: 100%;
    padding: 12px 18px;
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   Standalone Game Page Styles (game.html)
   ========================================================================== */

.game-page-body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
}

.game-ambient-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 520px;
  background-size: cover;
  background-position: center 25%;
  filter: blur(90px) saturate(180%);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

.game-page-container {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  padding-bottom: 72px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

#game-page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.game-page-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.game-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.game-breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
}

.game-breadcrumbs a:hover {
  color: #fff;
}

.crumb-separator {
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.crumb-current {
  color: #fff;
  font-weight: 600;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.game-quick-tools {
  flex-shrink: 0;
}

/* Loading & Error States */
.game-page-loading-state,
.game-page-error-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-surface-elevated, #161618);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  margin: 40px auto;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

/* Two-Column Showcase Grid */
.game-showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .game-showcase-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* Media Theater */
.game-media-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.game-media-stage-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: #000;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.game-media-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-video-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  max-width: 100%;
}

.game-media-stage iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stage-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  max-width: 100%;
}

.stage-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: transform 0.25s ease;
  max-width: 100%;
}

.stage-image-container:hover .stage-screenshot-img {
  transform: scale(1.015);
}

.stage-media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}

.stage-expand-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
}

.stage-expand-btn:hover {
  background: rgba(0, 0, 0, 0.95);
  transform: scale(1.08);
}

/* Gallery Strip */
.game-gallery-container {
  background: var(--bg-surface-elevated, #161618);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 14px 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.game-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  min-width: 0;
}

.game-gallery-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.game-gallery-count {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.game-gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.game-gallery-strip::-webkit-scrollbar {
  height: 6px;
}

.game-gallery-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.game-gallery-thumb {
  position: relative;
  flex: 0 0 124px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  cursor: pointer;
  background: #000;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.game-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-gallery-thumb:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.game-gallery-thumb.active-thumb {
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
}

.thumb-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.game-gallery-thumb:hover .thumb-play-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.thumb-type-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Info Column & Action Card */
.game-info-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.game-info-card {
  background: var(--bg-surface-elevated, #161618);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.game-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.game-page-title {
  font-size: 1.85rem;
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0;
  color: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.game-page-tagline {
  font-size: 0.96rem;
  line-height: 1.5;
  color: #f59e0b;
  font-weight: 600;
  margin: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  min-width: 0;
}

.game-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.btn-play-main {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
}

.game-meta-specs {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.spec-label {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.86rem;
}

.spec-value {
  color: #fff;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.spec-link {
  color: var(--primary, #3b82f6);
  text-decoration: none;
  word-break: break-word;
  overflow-wrap: anywhere;
}

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

/* Deep-Dive Sections */
.game-details-section,
.game-reviews-wall-section {
  margin-bottom: 28px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.section-card {
  background: var(--bg-surface-elevated, #161618);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 12px);
  padding: 28px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.section-heading {
  font-size: 1.3rem;
  font-family: var(--font-heading);
  margin: 0 0 16px;
  color: #fff;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.game-description-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Creator Coverage Wall Card */
.reviews-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.reviews-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 10px);
  padding: 16px 20px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.summary-stat-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-stars-avg {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f59e0b;
}

.summary-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-verified-tag {
  font-size: 0.82rem;
  color: #c084fc;
  background: rgba(145, 70, 255, 0.12);
  border: 1px solid rgba(145, 70, 255, 0.3);
  padding: 5px 12px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
}

.reviews-feed-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.creator-review-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: -46px;
  right: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  transition: color 0.2s;
}

.lightbox-close-btn:hover {
  color: var(--primary, #3b82f6);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn {
  left: -58px;
}

.lightbox-next-btn {
  right: -58px;
}

.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .game-page-body {
    overflow-x: hidden !important;
    width: 100vw;
    max-width: 100vw;
  }

  .game-page-container {
    padding: 12px 14px 40px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .game-page-nav-bar {
    margin-bottom: 12px;
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .game-breadcrumbs {
    font-size: 0.78rem;
    gap: 5px;
    min-width: 0;
  }

  .crumb-current {
    max-width: 105px;
  }

  .game-quick-tools .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .game-showcase-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
  }

  .game-media-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .game-media-stage-wrapper {
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .stage-media-badge {
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .stage-expand-btn {
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
  }

  .game-gallery-container {
    padding: 8px 10px;
    border-radius: 8px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .game-gallery-header {
    margin-bottom: 6px;
  }

  .game-gallery-label {
    font-size: 0.68rem;
  }

  .game-gallery-count {
    font-size: 0.72rem;
  }

  .game-gallery-strip {
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .game-gallery-thumb {
    flex: 0 0 80px;
    border-radius: 4px;
  }

  .game-info-column {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .game-info-card {
    padding: 16px 14px;
    gap: 12px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .game-badges-row {
    gap: 6px;
  }

  .game-page-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .game-page-tagline {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .game-action-stack {
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .btn-play-main,
  .game-action-stack .btn {
    padding: 11px 12px;
    font-size: 0.9rem;
    min-height: 44px;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
  }

  .game-meta-specs {
    font-size: 0.82rem;
    gap: 8px;
    padding-top: 12px;
    width: 100%;
  }

  .spec-item {
    gap: 8px;
    width: 100%;
  }

  .spec-label {
    font-size: 0.82rem;
  }

  .spec-value {
    font-size: 0.82rem;
  }

  .section-card {
    padding: 16px 12px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
  }

  .section-heading {
    font-size: 1.15rem;
    margin-bottom: 12px;
  }

  .game-description-text {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .reviews-header-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
    width: 100%;
  }

  .reviews-header-wrap .btn {
    width: 100%;
    justify-content: center;
  }

  .reviews-summary-bar {
    padding: 12px 12px;
    gap: 10px;
    border-radius: 8px;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .summary-stat-left {
    gap: 10px;
    flex-wrap: wrap;
  }

  .summary-stars-avg {
    font-size: 1.25rem;
  }

  .summary-subtext {
    font-size: 0.82rem;
  }

  .summary-verified-tag {
    font-size: 0.76rem;
    padding: 4px 10px;
  }

  .lightbox-prev-btn {
    left: 10px;
  }

  .lightbox-next-btn {
    right: 10px;
  }
}


/* ---------- Legal pages (terms, privacy) ---------- */
.legal-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--border-subtle); position: relative; overflow: hidden; }
.legal-hero::before { content: ""; position: absolute; top: -240px; right: -120px; width: 640px; height: 640px; background: radial-gradient(closest-side, rgba(59,130,246,0.14), transparent 70%); pointer-events: none; }
.legal-eyebrow { color: var(--accent-hover); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 12px; }
.legal-hero h1 { font-family: var(--font-heading); font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.03em; margin: 0; }
.legal-lede { color: var(--text-secondary); font-size: 1.1rem; max-width: 62ch; margin: 16px 0 0; line-height: 1.6; }
.legal-meta { color: var(--text-muted); font-size: 0.85rem; margin: 18px 0 0; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 80px; align-items: start; }
.legal-toc { position: sticky; top: 100px; font-size: 0.88rem; }
.legal-toc p { color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; margin: 0 0 12px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border-subtle); }
.legal-toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-muted); text-decoration: none; }
.legal-toc a:hover { color: #fff; border-left-color: var(--accent-color); }
.legal { max-width: 74ch; counter-reset: legal; }
.legal-section { padding-bottom: 36px; scroll-margin-top: 100px; }
.legal-section + .legal-section { border-top: 1px solid var(--border-subtle); padding-top: 34px; }
.legal h2 { font-family: var(--font-heading); font-size: 1.35rem; margin: 0 0 14px; display: flex; gap: 12px; align-items: baseline; }
.legal h2::before { counter-increment: legal; content: counter(legal, decimal-leading-zero); color: var(--accent-hover); font-size: 0.85rem; }
.legal p, .legal li { color: var(--text-secondary); line-height: 1.72; margin: 0; }
.legal p + p, .legal p + ul, .legal ul + p, .legal .legal-table-wrap + p { margin-top: 14px; }
.legal ul { padding-left: 20px; margin: 0; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--accent-hover); }
.legal strong { color: #fff; }
.legal a { color: var(--accent-hover); text-underline-offset: 3px; }
.legal-table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-solid); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-secondary); }
.legal-table th { color: var(--text-muted); background: rgba(255,255,255,0.02); white-space: nowrap; }
.legal-table tr:last-child td { border-bottom: 0; }
.footer-legal { display: inline-flex; gap: 8px; margin-left: 10px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: #fff; }
.form-consent { color: var(--text-muted); font-size: 0.82rem; text-align: center; margin: 12px 0 0; line-height: 1.5; }
.form-consent a { color: var(--text-secondary); }
@media (max-width: 880px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .legal-toc { position: static; background: var(--surface-solid); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; }
  .legal-toc ol { border-left: 0; columns: 2; column-gap: 20px; }
  .legal-toc a { padding-left: 0; border-left: 0; }
  .footer-legal { display: flex; margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 520px) { .legal-toc ol { columns: 1; } }
