/* =========================================================
   Hello S Plays — CSS
   Dark gaming theme, responsive, production-ready
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Rajdhani:wght@500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --g-bg:         #f4f5f7;
  --g-surface:    #ffffff;
  --g-card:       #ffffff;
  --g-border:     #e5e7eb;
  --g-primary:    #ff4f4f;
  --g-primary-h:  #e03e3e;
  --g-accent:     #ff4f4f;
  --g-accent2:    #ff4f4f;
  --g-gold:       #ff4f4f;
  --g-red:        #ef4444;
  --g-green:      #10b981;
  --g-text:       #1f2937;
  --g-muted:      #6b7280;
  --g-heading:    'Inter', sans-serif;
  --g-body:       'Inter', sans-serif;
  --g-radius:     16px;
  --g-radius-sm:  8px;
  --g-shadow:     0 4px 12px rgba(0,0,0,0.05);
  --g-shadow-lg:  0 10px 25px rgba(0,0,0,0.08);
  --g-transition: all 0.25s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.games-page {
  font-family: var(--g-body);
  background: var(--g-bg);
  color: var(--g-text);
  min-height: 100vh;
}

/* ── Games Navigation ── */
.games-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--g-border);
  transition: var(--g-transition);
}

.games-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.games-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--g-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--g-text);
  text-decoration: none;
  white-space: nowrap;
}

.games-nav-logo span { color: var(--g-primary); }

.games-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.games-nav-links > li { position: relative; }

.games-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--g-radius-sm);
  color: var(--g-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--g-transition);
  white-space: nowrap;
}

.games-nav-link:hover,
.games-nav-link.active {
  color: var(--g-text);
  background: var(--g-surface);
}

.games-nav-link svg { width: 15px; height: 15px; }

/* Dropdown mega menu */
.games-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow-lg);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--g-transition);
  z-index: 100;
}

.games-nav-links > li:hover .games-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.games-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--g-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--g-transition);
}

.games-dropdown a:hover {
  color: var(--g-primary);
  background: rgba(255,79,79,0.08);
}

.games-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 180px);
  padding: 8px;
}

/* Search bar */
.games-search-wrap {
  position: relative;
  margin-left: auto;
}

.games-search-input {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: 50px;
  color: var(--g-text);
  padding: 8px 16px 8px 40px;
  font-size: 0.85rem;
  width: 240px;
  transition: var(--g-transition);
  outline: none;
}

.games-search-input:focus {
  border-color: var(--g-primary);
  width: 300px;
  background: var(--g-surface);
}

.games-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--g-muted);
  width: 16px;
  height: 16px;
}

.games-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}

.games-search-results.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--g-text);
  transition: var(--g-transition);
  border-bottom: 1px solid var(--g-border);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,79,79,0.08); }

.search-result-img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--g-card);
  flex-shrink: 0;
}

.search-result-title { font-weight: 600; font-size: 0.88rem; }
.search-result-meta { color: var(--g-muted); font-size: 0.78rem; margin-top: 2px; }

/* ── Container ── */
.g-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ── Breadcrumb ── */
.g-breadcrumb {
  padding: 12px 0;
  font-size: 0.82rem;
  color: var(--g-muted);
}

.g-breadcrumb ol { display: flex; list-style: none; gap: 6px; align-items: center; }
.g-breadcrumb li + li::before { content: '/'; margin-right: 6px; }
.g-breadcrumb a { color: var(--g-muted); text-decoration: none; }
.g-breadcrumb a:hover { color: var(--g-primary); }
.g-breadcrumb [aria-current] { color: var(--g-text); }

/* ── Section Headers ── */
.g-section { padding: 48px 0; }
.g-section-sm { padding: 28px 0; }

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

.g-section-title {
  font-family: var(--g-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--g-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.g-section-title svg { color: var(--g-primary); width: 24px; height: 24px; }

.g-view-all {
  color: var(--g-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--g-transition);
}

.g-view-all:hover { color: var(--g-accent); }

/* ── Game Cards ── */
.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.g-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.game-card {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  overflow: hidden;
  transition: var(--g-transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--g-primary);
  box-shadow: 0 8px 24px rgba(255,79,79,0.12);
}

.game-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--g-surface);
  overflow: hidden;
}
.game-card-thumb::after {
  content: '';
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  background-color: #ffffff;
  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='%23ff4f4f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: all 0.25s ease;
  z-index: 5;
}
.game-card:hover .game-card-thumb::after {
  background-color: #ff4f4f;
  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='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.game-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--g-surface), var(--g-card));
}

.game-card-thumb-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--g-border);
}

.game-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-free { background: #d1fae5; color: #065f46; }
.badge-trending { background: #ff4f4f; color: #ffffff; }
.badge-featured { background: #dbeafe; color: #1e40af; }
.badge-editors { background: #fef3c7; color: #92400e; }
.badge-paid { background: #f3f4f6; color: #374151; border: none; }

.game-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }

.game-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--g-text);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
}

.game-card-genre {
  font-size: 0.72rem;
  color: #374151;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.game-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #ff4f4f;
  font-weight: 600;
}
.game-card-rating svg {
  width: 13px !important;
  height: 13px !important;
  color: #ff4f4f !important;
  fill: #ff4f4f !important;
}

.game-card-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--g-green);
}

.game-card-price.paid { color: var(--g-gold); }

/* ── Unique 3D Glass-Console Hero Redesign ── */
.g-hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, #ffefef 0%, #f4f5f7 100%);
  padding: 40px 0;
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .g-hero {
    height: auto;
    padding: 24px 0 60px;
  }
}

.g-hero-slides {
  width: 100%;
  height: 100%;
  display: flex;
}

.g-hero-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0;
  background: transparent;
}

.g-hero-slide-bg {
  position: absolute;
  top: 50%;
  right: -10%;
  transform: translateY(-50%);
  width: 60%;
  height: 80%;
  object-fit: cover;
  opacity: 0.15;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
}

.g-hero-slide::after {
  display: none;
}

.g-hero-content-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.g-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .g-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.g-hero-glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
  position: relative;
}

@media (max-width: 600px) {
  .g-hero-glass-card {
    padding: 24px;
    border-radius: 16px;
  }
}

.g-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 79, 79, 0.1);
  color: #ff4f4f;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 79, 79, 0.15);
}

.g-hero-title {
  font-family: var(--g-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #111827;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.g-hero-desc {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.g-hero-actions-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.g-hero-price-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #10b981;
}

.price-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.g-hero-isometric-card {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.isometric-card-inner {
  width: 320px;
  height: 420px;
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  box-shadow: -15px 25px 50px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transform: rotateY(-12deg) rotateX(10deg);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

@media (max-width: 900px) {
  .isometric-card-inner {
    width: 280px;
    height: 360px;
    transform: none;
  }
}

.isometric-card-inner:hover {
  transform: rotateY(-4deg) rotateX(4deg) translateY(-8px);
  box-shadow: -20px 35px 60px rgba(0, 0, 0, 0.12);
}

.isometric-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: #f3f4f6;
}

.isometric-placeholder {
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}

.isometric-badge {
  position: absolute;
  top: 32px;
  right: 32px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 3;
}

.g-hero-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  z-index: 10;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.g-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: var(--g-transition);
  border: none;
}

.g-hero-dot.active {
  background: var(--g-primary);
  width: 24px;
  border-radius: 4px;
}

/* ── Generic Button Helpers ── */
.g-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--g-radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--g-transition);
  border: none;
  cursor: pointer;
}

.g-btn-primary {
  background: var(--g-primary);
  color: #fff;
}

.g-btn-primary:hover {
  background: var(--g-primary-h);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,79,79,0.4);
}

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

.g-btn-outline:hover {
  border-color: var(--g-primary);
  color: var(--g-primary);
}

.g-btn-success {
  background: var(--g-green);
  color: #000;
}

.g-btn-success:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
}

.g-btn svg { width: 18px; height: 18px; }

/* ── Horizontal Scroll Row ── */
.g-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--g-border) transparent;
}

.g-scroll-row::-webkit-scrollbar { height: 4px; }
.g-scroll-row::-webkit-scrollbar-track { background: transparent; }
.g-scroll-row::-webkit-scrollbar-thumb { background: var(--g-border); border-radius: 4px; }

.g-scroll-row .game-card {
  min-width: 200px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Category Chips ── */
.g-category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.g-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--g-transition);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.g-chip:hover,
.g-chip.active {
  background: #ff4f4f;
  border-color: #ff4f4f;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(255, 79, 79, 0.25);
  transform: translateY(-1px);
}

.g-chip svg {
  width: 14px;
  height: 14px;
  color: #9ca3af;
  transition: var(--g-transition);
}

.g-chip:hover svg,
.g-chip.active svg {
  color: #ffffff;
}

/* ── Filters Bar ── */
.g-filters {
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.g-filter-label {
  font-size: 0.8rem;
  color: var(--g-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.g-select {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius-sm);
  color: var(--g-text);
  padding: 7px 12px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--g-transition);
}

.g-select:focus { border-color: var(--g-primary); }

.g-filter-divider {
  width: 1px;
  height: 20px;
  background: var(--g-border);
}

/* ── Game Detail Page ── */
.g-game-header {
  position: relative;
  background: var(--g-surface);
  border-bottom: 1px solid var(--g-border);
  overflow: hidden;
}

.g-game-header-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  filter: blur(20px);
}

.g-game-header-content {
  position: relative;
  z-index: 2;
  padding: 40px 0;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.g-game-cover {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--g-radius);
  overflow: hidden;
  box-shadow: var(--g-shadow-lg);
  background: var(--g-card);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.g-game-info { flex: 1; }

.g-game-title {
  font-family: var(--g-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--g-text);
  line-height: 1.1;
  margin-bottom: 8px;
}

.g-game-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0;
}

.g-game-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--g-muted);
}

.g-game-meta-item svg { width: 14px; height: 14px; color: var(--g-primary); }
.g-game-meta-item strong { color: var(--g-text); }

.g-game-rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.g-rating-score {
  font-family: var(--g-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--g-gold);
  line-height: 1;
}

.g-rating-stars { color: var(--g-gold); font-size: 1.2rem; }
.g-rating-count { font-size: 0.82rem; color: var(--g-muted); }

.g-download-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* ── Screenshots Gallery ── */
.g-screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.g-screenshot {
  aspect-ratio: 16/9;
  border-radius: var(--g-radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--g-card);
}

.g-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.g-screenshot:hover img { transform: scale(1.05); }

/* ── Lightbox ── */
.g-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.g-lightbox.open { display: flex; }

.g-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--g-radius);
  object-fit: contain;
}

.g-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--g-card);
  border: none;
  color: var(--g-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Video Trailer ── */
.g-trailer {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--g-radius);
  overflow: hidden;
  background: #000;
}

.g-trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Info Tables ── */
.g-info-table { width: 100%; border-collapse: collapse; }

.g-info-table tr { border-bottom: 1px solid var(--g-border); }
.g-info-table tr:last-child { border-bottom: none; }

.g-info-table th {
  text-align: left;
  padding: 10px 16px;
  color: var(--g-muted);
  font-size: 0.82rem;
  font-weight: 500;
  width: 35%;
  background: var(--g-surface);
}

.g-info-table td {
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--g-text);
}

/* ── Cards for Game Detail ── */
.g-card {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  padding: 24px;
}

.g-card-title {
  font-family: var(--g-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--g-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.g-card-title svg { width: 18px; height: 18px; color: var(--g-primary); }

/* ── Tags ── */
.g-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.g-tag {
  padding: 4px 12px;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  border-radius: 4px;
  color: var(--g-muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: var(--g-transition);
}

.g-tag:hover { border-color: var(--g-primary); color: var(--g-primary); }

/* ── Pagination ── */
.g-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.g-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--g-radius-sm);
  background: var(--g-card);
  border: 1px solid var(--g-border);
  color: var(--g-text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--g-transition);
}

.g-page-btn:hover { border-color: var(--g-primary); color: var(--g-primary); }
.g-page-btn.active { background: var(--g-primary); border-color: var(--g-primary); color: #fff; }
.g-page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── News Cards ── */
.news-card {
  background: var(--g-card);
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--g-transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  border-color: var(--g-primary);
  transform: translateY(-3px);
}

.news-card-img {
  aspect-ratio: 16/9;
  background: var(--g-surface);
  overflow: hidden;
}

.news-card-img img { width: 100%; height: 100%; object-fit: cover; }

.news-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.news-card-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--g-primary); margin-bottom: 8px; }
.news-card-title { font-weight: 700; font-size: 1rem; line-height: 1.4; color: var(--g-text); margin-bottom: 8px; }
.news-card-excerpt { font-size: 0.85rem; color: var(--g-muted); line-height: 1.5; margin-bottom: 12px; }
.news-card-date { font-size: 0.78rem; color: var(--g-muted); margin-top: auto; }

/* ── Category Hero ── */
.g-category-hero {
  background: linear-gradient(135deg, var(--g-surface) 0%, var(--g-card) 100%);
  border-bottom: 1px solid var(--g-border);
  padding: 40px 0;
}

.g-category-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.g-category-icon-wrap {
  width: 64px;
  height: 64px;
  background: rgba(255,79,79,0.15);
  border: 1px solid rgba(255,79,79,0.3);
  border-radius: var(--g-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.g-category-icon-wrap svg { width: 30px; height: 30px; color: var(--g-primary); }

.g-category-name {
  font-family: var(--g-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--g-text);
}

.g-category-desc { color: var(--g-muted); font-size: 0.9rem; margin-top: 4px; }
.g-category-count { font-size: 0.82rem; color: var(--g-muted); margin-top: 4px; }

/* ── Floating Stats Console Bar (Redesigned) ── */
.g-floating-stats {
  position: relative;
  z-index: 9;
  margin-top: -30px;
  margin-bottom: 24px;
}

.g-stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .g-floating-stats {
    display: none;
  }
}

.g-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  transition: var(--g-transition);
  font-size: 0.85rem;
  color: #4b5563;
}

.g-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
  border-color: #ff4f4f;
}

.g-stat-card strong {
  font-size: 1.3rem;
  color: #111827;
  font-weight: 800;
}

/* Pulsing Diagnostics Dots */
.stat-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.green-pulse { background: #10b981; }
.green-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: pulse 2s infinite;
  opacity: 0;
}

.red-pulse { background: #ff4f4f; }
.red-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #ff4f4f;
  animation: pulse 2s infinite;
  opacity: 0;
}

.blue-pulse { background: #3b82f6; }
.blue-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  animation: pulse 2s infinite;
  opacity: 0;
}

.gold-pulse { background: #f59e0b; }
.gold-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  animation: pulse 2s infinite;
  opacity: 0;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ── Platform Badges ── */
.g-platform-list { display: flex; flex-wrap: wrap; gap: 6px; }

.g-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--g-surface);
  border: 1px solid var(--g-border);
  color: var(--g-muted);
}

/* ── Content blocks ── */
.g-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--g-text);
}

.g-content h2 {
  font-family: var(--g-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--g-text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--g-border);
}

.g-content h3 {
  font-family: var(--g-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--g-accent);
  margin: 20px 0 8px;
}

.g-content p { margin-bottom: 16px; }
.g-content ul, .g-content ol { margin: 12px 0 16px 24px; }
.g-content li { margin-bottom: 6px; }

/* ── Alert / Notice ── */
.g-notice {
  background: rgba(255,79,79,0.1);
  border-left: 3px solid var(--g-primary);
  border-radius: 0 var(--g-radius-sm) var(--g-radius-sm) 0;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--g-text);
  margin: 16px 0;
}

/* ── Empty State ── */
.g-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--g-muted);
}

.g-empty svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.3; }
.g-empty h3 { font-size: 1.2rem; color: var(--g-text); margin-bottom: 8px; }

/* ── Search page ── */
.g-search-hero {
  background: var(--g-surface);
  border-bottom: 1px solid var(--g-border);
  padding: 48px 0;
  text-align: center;
}

.g-search-hero h1 {
  font-family: var(--g-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--g-text);
  margin-bottom: 20px;
}

.g-search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: var(--g-card);
  border: 2px solid var(--g-border);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--g-transition);
}

.g-search-box:focus-within { border-color: var(--g-primary); }

.g-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: var(--g-text);
  font-size: 1rem;
  outline: none;
}

.g-search-box button {
  background: var(--g-primary);
  border: none;
  color: #fff;
  padding: 0 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: var(--g-transition);
}

.g-search-box button:hover { background: var(--g-primary-h); }

/* ── Games Footer ── */
.games-footer {
  background: var(--g-surface);
  border-top: 1px solid var(--g-border);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.games-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.games-footer-brand p { color: var(--g-muted); font-size: 0.88rem; line-height: 1.6; margin-top: 12px; }

.games-footer-col h4 {
  font-family: var(--g-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--g-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.games-footer-col ul { list-style: none; }
.games-footer-col ul li { margin-bottom: 8px; }
.games-footer-col a { color: var(--g-muted); text-decoration: none; font-size: 0.88rem; transition: var(--g-transition); }
.games-footer-col a:hover { color: var(--g-primary); }

.games-footer-bottom {
  border-top: 1px solid var(--g-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--g-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.games-footer-bottom a { color: var(--g-muted); text-decoration: none; }
.games-footer-bottom a:hover { color: var(--g-primary); }

/* ── Responsive & Mobile Menu ── */
.games-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--g-border);
  color: var(--g-text);
  border-radius: var(--g-radius-sm);
  padding: 7px;
  cursor: pointer;
  margin-left: 12px;
  align-items: center;
  justify-content: center;
  transition: var(--g-transition);
}

.games-hamburger:hover {
  background: var(--g-bg);
  border-color: var(--g-primary);
  color: var(--g-primary);
}

.games-mobile-menu {
  position: fixed;
  inset: 0;
  top: 64px;
  background: var(--g-surface);
  z-index: 999;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.games-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.games-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--g-text);
  text-decoration: none;
  border-radius: var(--g-radius-sm);
  font-size: 0.98rem;
  font-weight: 500;
  transition: var(--g-transition);
  border-bottom: 1px solid var(--g-border);
}

.games-mobile-menu a:last-child {
  border-bottom: none;
}

.games-mobile-menu a:hover {
  background: var(--g-bg);
  color: var(--g-primary);
}

.games-mobile-menu a svg {
  width: 18px;
  height: 18px;
  color: var(--g-muted);
}

.games-mobile-menu a:hover svg {
  color: var(--g-primary);
}

/* ── Media Queries ── */
@media (max-width: 1100px) {
  .games-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 900px) {
  .g-container {
    padding: 0 16px;
  }
  .games-nav-links {
    display: none;
  }
  .games-hamburger {
    display: flex;
  }
  .games-search-wrap {
    flex: 1;
    margin-left: 16px;
  }
  .games-search-input {
    width: 100% !important;
    max-width: 100%;
  }
  .games-search-input:focus {
    width: 100% !important;
  }
  #gameDetailGrid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .g-game-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 0;
  }
  .g-game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .g-game-meta-row {
    justify-content: center;
  }
  .g-game-rating-display {
    justify-content: center;
  }
  .g-platform-list {
    justify-content: center;
  }
  .g-game-cover {
    width: 150px;
  }
}

@media (max-width: 600px) {
  .games-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .g-hero {
    height: auto !important;
  }
  .g-hero-slide {
    padding: 24px 0 !important;
  }
  .g-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .g-filter-divider {
    display: none;
  }
  .g-stats-bar {
    flex-wrap: wrap;
    gap: 16px;
  }
  .g-download-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .g-download-btns .g-btn {
    justify-content: center;
  }
  .g-scroll-row {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .games-nav-logo {
    font-size: 1.18rem !important;
    gap: 4px;
  }
  .games-nav-logo span {
    display: inline !important;
  }
  .games-nav-logo svg {
    width: 18px;
    height: 18px;
  }
  .games-search-wrap {
    max-width: 140px;
    transition: max-width 0.2s ease;
  }
  .games-search-wrap:focus-within {
    max-width: 180px;
  }
}

@media (max-width: 375px) {
  .games-nav-logo {
    font-size: 1.05rem !important;
  }
  .games-search-wrap {
    max-width: 110px;
  }
  .games-search-wrap:focus-within {
    max-width: 140px;
  }
}

/* ── Responsive Ad Containers ── */
.ad-wrapper-responsive {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0;
  width: 100%;
  overflow: hidden;
}
.ad-desktop-728 { display: block; }
.ad-desktop-468 { display: none; }
.ad-mobile-320 { display: none; }

@media (max-width: 768px) {
  .ad-desktop-728 { display: none; }
  .ad-desktop-468 { display: block; }
  .ad-mobile-320 { display: none; }
}
@media (max-width: 480px) {
  .ad-desktop-728 { display: none; }
  .ad-desktop-468 { display: none; }
  .ad-mobile-320 { display: block; }
}

.ad-sidebar-skyscraper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}
@media (max-width: 900px) {
  .ad-sidebar-skyscraper {
    display: none;
  }
}

/* ── News Article Grid Layout ── */
#articleGrid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}
@media (max-width: 900px) {
  #articleGrid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
}

/* ── Sticky Bottom Ad Bar ── */
.g-sticky-ad-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--g-border);
  z-index: 9999;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
}

.g-sticky-ad-close {
  position: absolute;
  top: -24px;
  right: 16px;
  background: #ff4f4f;
  color: #ffffff;
  border: none;
  border-radius: 4px 4px 0 0;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--g-transition);
}

.g-sticky-ad-close:hover {
  background: var(--g-primary-h);
}

/* ── Fixed Desktop Skyscraper Gutters ── */
.g-gutter-ad-left,
.g-gutter-ad-right {
  position: fixed;
  top: 120px;
  width: 160px;
  height: 600px;
  z-index: 100;
  display: none;
}

.g-gutter-ad-left {
  left: 20px;
}

.g-gutter-ad-right {
  right: 20px;
}

/* Show only on wide monitors to prevent overlapping content */
@media (min-width: 1760px) {
  .g-gutter-ad-left,
  .g-gutter-ad-right {
    display: block;
  }
}

/* ── Featured News Article Layout ── */
.g-featured-article {
  display: flex;
  background: var(--g-card);
  border: 2px solid var(--g-border);
  border-radius: var(--g-radius);
  overflow: hidden;
  margin-bottom: 40px;
  text-decoration: none;
  color: inherit;
  transition: var(--g-transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.g-featured-article:hover {
  border-color: var(--g-primary);
  transform: translateY(-2px);
}

.g-featured-article-img {
  width: 320px;
  min-width: 320px;
  background: var(--g-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--g-border);
}

.g-featured-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
}

.g-featured-article-body {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 768px) {
  .g-featured-article {
    flex-direction: column;
    margin-bottom: 24px;
  }
  .g-featured-article-img {
    width: 100%;
    min-width: 100%;
    height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--g-border);
  }
  .g-featured-article-img img {
    min-height: 100%;
  }
  .g-featured-article-body {
    padding: 20px;
  }
}
