/* =============================================
   ZArcade Theme - Main Stylesheet
   Version: 2.0
   ============================================ */

/* ================ 
   CSS VARIABLES 
   ================ */

:root {
  /* new */
  /* Text */
  --color-white: #fff;
  --color-text-main: #f5f5f5;
  --color-text-muted: #b3b3b3;
  --color-text-subtle: #808080;
  --black-100: #0c0d14;

  /* Backgrounds */
  --color-bg-main: #121212;
  --color-bg-secondary: #1e1e1e;
  --color-bg-card: #1a1a1a;
  --color-bg-light: rgb(19, 20, 30);
  --color-bg-inputs: rgb(55 57 82);

  /* Color System */
  --primary: #9d00ff; /* Neon Purple */
  --accent-hover: #b833ff; /* Lighter Purple on Hover */
  /* Add RGBA versions */
  --primary-rgba-08: rgba(157, 0, 255, 0.8);
  --primary-rgba-04: rgba(157, 0, 255, 0.4);
  --primary-rgba-02: rgba(157, 0, 255, 0.2);
  --light-white: #aaadbe;

  --primary-dark: #3a56d4;
  --secondary: #f72585;
  --accent: #4cc9f0;
  --dark: #14213d;
  --darker: #0d1b2a;
  --light: #f8f9fa;
  --lighter: #ffffff;
  --gray: #e5e5e5;
  --dark-gray: #6c757d;

  /* Typography */
  --font-primary: "Nunito", sans-serif;
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Barlow", var(--font-main);
  --text-base: 1rem;
  --text-scale: 1.25;
  --text-xs: calc(var(--text-base) / var(--text-scale));
  --text-sm: calc(var(--text-xs) * var(--text-scale));
  --text-md: calc(var(--text-sm) * var(--text-scale));
  --text-lg: calc(var(--text-md) * var(--text-scale));
  --text-xl: calc(var(--text-lg) * var(--text-scale));
  --text-2xl: calc(var(--text-xl) * var(--text-scale));
  --text-3xl: calc(var(--text-2xl) * var(--text-scale));

  /* Spacing */
  --space-unit: 1rem;
  --space-xxs: calc(var(--space-unit) / 4);
  --space-xs: calc(var(--space-unit) / 2);
  --space-sm: var(--space-unit);
  --space-md: calc(var(--space-unit) * 1.5);
  --space-lg: calc(var(--space-unit) * 2);
  --space-xl: calc(var(--space-unit) * 3);
  --space-2xl: calc(var(--space-unit) * 4);

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ================ 
   BASE STYLES 
   ================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

/* ================ 
   LAYOUT 
   ================ */

main {
  padding: 10px 20px;
}

.container {
  width: 100%;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.error-page-wrapper {
  padding-top: 8rem;
  margin-bottom: 4rem;
}

/* ================ 
   HERO SECTION 
   ================ */
   
h1.hero-heading {
    text-align: center;
    margin-top: 6rem;
    background-color: var(--primary);
    padding: 1.5rem;
    border-radius: 10px;
    font-size: 1.5rem;
}
    
.section-hero {
  padding-top: 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ================ 
   HEADER 
   ================ */

/* Menu icons */
.cg-nav-menu svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 10px;
  fill: currentColor;
}

.cg-header {
  background: rgba(33, 34, 51, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 20px;
  position: fixed;
  z-index: 12;
  width: 100%;
}

.cg-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/*.cg-logo img {*/
/*  height: 40px;*/
/*}*/

.cg-logo {
  margin-left: 1.3rem;
}

/* SEARCH INPUT */
.search-results-subtitle {
  font-size: 1.5rem;
  margin-top: 5rem;
}

.cg-search {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  position: relative;
  /* ← needed for absolute positioning below */
}

.search-form {
  background-color: #373952;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem;
  border-radius: 10rem;
  width: 100%;
  max-width: 600px;
  /* optional constraint */
}

.search-field {
  background-color: transparent;
  width: 100%;
  border: none;
  outline: none;
  font: inherit;
  color: #aaadbe;
  font-weight: 900;
  font-size: 1rem;
  padding-inline: 0.6rem;
}

.search-submit {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.search-submit img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

/* Hide default "×" in Chrome/Edge/Firefox */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

input[type="search"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* ------------ LIVE SUGGESTIONS DROPDOWN ------------ */
ul.live-search-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem;
}

.live-search-item {
  list-style: none;
}

img.live-search-thumbnail {
  max-width: 6rem;
  border-radius: 10px;
}

.search-results-box {
  position: absolute;
  top: 100%;
  min-width: 600px;
  max-height: 300px;
  overflow-y: auto;
  background-color: var(--color-bg-main);
  border-top: none;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
  display: none;
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
}

.search-suggestion:hover {
  background-color: #f2f2f2;
}

.search-suggestion img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.search-suggestion span {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-search-link {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Loading Indicator */
.search-loading {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* View All Button */
.view-all-container {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #eee;
}

.view-all-btn {
  display: inline-block;
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s;
}

.view-all-btn:hover {
  color: var(--accent-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-loading {
    padding: 15px;
  }

  .view-all-btn {
    display: block;
    width: calc(100% - 30px);
    margin: 0 auto;
    text-align: center;
  }
}

/* End Search */

/* Sidebar */
.cg-sidebar::-webkit-scrollbar {
  width: 8px;
}

.cg-sidebar::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.cg-sidebar::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.cg-sidebar::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.cg-toggle {
  font-size: 28px;
  cursor: pointer;
}

.cg-sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.3s;
  z-index: 100;
}

/* Open state */
.cg-sidebar.open {
  width: 250px;
}

.cg-sidebar .cg-nav-menu {
  list-style: none;
  padding: 0;
}

.cg-sidebar .cg-nav-menu li {
  padding: 8px 16px;
}

.cg-sidebar .cg-nav-menu li a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.cg-sidebar .cg-nav-menu li:hover a {
  font-weight: 600;
  transform: translateX(8px);
}

.cg-sidebar-header {
  position: sticky;
  top: 0;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(33, 34, 51, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cg-sidebar .cg-close {
  font-size: 36px;
  cursor: pointer;
  color: #fff;
  line-height: 1.4;
}

.cg-search-sidebar {
  display: none;
  padding: 8px 16px;
  position: relative;
  z-index: -1;
}

@media (max-width: 768px) {
  .cg-sidebar.open {
    width: 100%;
  }

  .cg-search {
    display: none;
    /* Hides header search on mobile */
  }

  .cg-search-sidebar {
    display: block;
    /* Shows sidebar search on mobile */
    margin-top: 1rem;
  }
}

/* SIDEBAR FOOTER */
.cg-sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid #ddd;
  font-size: 0.875rem;
  color: #999;
}

.cg-footer-links {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.cg-footer-links li {
  margin-bottom: 0.5rem;
}

.cg-footer-links a {
  color: #666;
  text-decoration: none;
}

.cg-social-links {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.cg-social-links a {
  color: #666;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.cg-social-links a:hover {
  color: #4361ee;
  /* or your brand color */
}

/* NOTIFICATIONS BUTTON */
.cg-notification-wrapper {
  position: relative;
  margin-left: 20px;
}

.cg-notification-icon {
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  outline: none;
}

.cg-notification-icon img {
  width: 24px;
  height: 24px;
}

.cg-notification-count {
  position: absolute;
  top: -5px;
  right: -10px;
  background: red;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cg-notification-list {
  position: absolute;
  top: 30px;
  right: 0;
  background: rgba(33, 34, 51, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 350px;
  min-width: 250px;
  z-index: 999;
  list-style: none;
  padding: 10px;
  border-radius: 5px;
  max-height: 400px;
  overflow-y: auto;
}

.cg-notification-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.cg-notification-list li:last-child {
  border-bottom: none;
}

.cg-notification-list a {
  text-decoration: none;
  color: var(--color-white);
  font-size: 14px;
  display: block;
}

/* 🔄 NEW styles for icon + title layout inside list item */
.cg-notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cg-notification-img {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
  border-radius: 10px;
}

.cg-notification-title {
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-white);
}

.cg-notification-description {
  font-size: 12px;
  color: #ccc;
  margin: 2px 0 0;
  line-height: 1.4;
}

.cg-notification-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.cg-notification-list::-webkit-scrollbar {
  width: 6px;
}

.cg-notification-list::-webkit-scrollbar-track {
  background: transparent;
}

.cg-notification-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.cg-notification-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ================ 
   TAXONOMY GAME CATEGORY
   ================ */
.archive-header {
  padding-top: 5rem;
}

.archive-title {
  font-weight: bold;
}

.category-long-description {
  background-color: var(--color-bg-light);
  border-radius: 10px;
  padding: 30px 30px 0px;
}

.archive-description,
.category-long-description {
  color: var(--light-white);
}

.games-filter-bar {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  align-items: center;
}

.filter-dropdown {
  display: flex;
  align-items: center;
  gap: 10px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-dropdown select {
  font: inherit;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--color-bg-light);
  min-width: 200px;
  background: var(--color-bg-inputs);
  color: var(--color-white);
}

/* ================ 
   GAME CARDS 
   ================ */
.games-grid {
  display: grid;
  gap: 0.8rem;
  margin: var(--space-lg) 0;
  grid-template-columns: repeat(2, 1fr); /* default for small screens */
}

@media (min-width: 576px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .games-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.game-card {
  position: relative;
  background-color: var(--lighter);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  will-change: transform;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-lg);
}

/* GAME THUMBNAIL */
/* Thumbnail Container */
.game-thumbnail {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (adjust as needed) */
  overflow: hidden;
  background: #f5f5f5; /* Match this to your grid background */
}

/* Image Styling - Full image display */
.game-thumbnail img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Default image styling */
.game-thumbnail img[src*="default-game.jpg"] {
  width: 80%; /* Smaller default image */
  height: auto;
}

/* Hover effects */
.game-card:hover .game-thumbnail img {
  transform: translate(-50%, -50%) scale(1.03);
}

.game-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  background-color: var(--secondary);
  color: var(--lighter);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  padding: var(--space-xxs) var(--space-xs);
  border-radius: var(--radius-sm);
  z-index: 10;
}

.game-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to top,
    var(--primary-rgba-04),
    var(--primary-rgba-02)
  );
  border: 4px solid var(--primary-rgba-08);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  overflow: hidden;

  opacity: 0;
  transition: opacity var(--transition), border-color var(--transition);
  z-index: 5;
}

.game-card:hover .game-hover .game-title {
  color: #fff;
  position: absolute;
  bottom: 0;
  left: 5px;
}

.game-card:hover .game-hover {
  opacity: 1;
}

.game-title {
  font-size: var(--text-sm);
  font-weight: 900;
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  position: absolute;
  bottom: -10px;
  left: 5px;
  text-overflow: ellipsis;
  transition: all 0.3s;
}

/* ================ 
   GAME SECTIONS 
   ================ */
.section {
  margin: var(--space-xl) 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  padding-bottom: var(--space-xs);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 0.25rem;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  font-weight: 600;
  color: var(--color-white);
}

.view-all:hover::after {
  transform: translateX(0.25rem);
}

/* ================ 
   POSTS PAGINATION 
   ================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  list-style: none;
  padding-left: 0;
}

.pagination li {
  display: inline-block;
}

.pagination a,
.pagination span {
  display: block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary);
  border-radius: 6px;
  text-decoration: none;
  color: var(--primary);
  transition: all 0.3s ease;
  font-weight: 600;
}

.pagination a:hover {
  background-color: var(--accent-hover);
  color: #fff;
  border-color: var(--accent-hover);
}

.pagination .current {
  background-color: var(--primary);
  color: #fff;
  pointer-events: none;
}

/* ================ 
   UTILITIES 
   ================ */

.font-base {
  font-size: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ================ 
       LAYOUT 
       ================ */
.game-single-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  /* max-width: 1340px;
        margin: 0 auto; */
  padding: 15px;
  padding-top: 7rem;
}

@media (max-width: 768px) {
  .game-single-container {
    grid-template-columns: 1fr;
  }
}

/* ================ 
       breadcrumb
       ================ */
.game-breadcrumb {
  font-size: 14px;
  margin-bottom: 12px;
}

.game-breadcrumb a {
  color: #aaa;
  text-decoration: none;
}

.game-breadcrumb a:hover {
  text-decoration: underline;
}

/* ================ 
       SHARE BUTTONS
       ================ */
.game-share-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
}

.game-share-buttons .share-btn,
.game-share-buttons button,
.cg-social-links .share-btn
{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  border: none;
  text-decoration: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cg-social-links .share-btn {
  width: 30px;
  height: 30px;
  margin-top: 1rem;
}


.share-btn.facebook {
  background-color: #1877f2;
}

.share-btn.x {
  background-color: #000000;
}

.share-btn.whatsapp {
  background-color: #25d366;
}

.share-btn.reddit {
  background-color: #ff5700;
}

.share-btn.pinterest {
  background-color: #e60023;
}

.share-btn.copy-link {
  background-color: #4a4a5a;
}

.game-share-buttons svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ================ 
        GAME DETAILS
       ================ */
article h1.single-game-title {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0.5em 0;
    /* Add these to ensure full recognition */
    display: block;
    font-family: inherit;
}

/* Fallback for older browsers */
h1.single-game-title {
    font-size: 1.6rem;
}

/* Modern heading reset */
article h1, section h1, aside h1, nav h1 {
    font-size: unset;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 0.67em 0;
    display: block;
}

.game-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.game-details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  /* Wider left column */
  gap: 20px;
  margin: 40px 0;
}

@media (max-width: 768px) {
  .game-details-grid {
    grid-template-columns: 1fr;
    /* Mobile: 1-column layout */
  }
}

@media (max-width: 968px) {
  .game-details-grid {
    grid-template-columns: 1fr;
    /* Mobile: 1-column layout */
  }
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: #15151e;
  /* padding: 20px; */
  border-radius: 10px;
}

.ad-block img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.game-about {
  background: #1c1c2b;
  /* Optional: match your dark theme */
  padding: 20px;
  border-radius: 8px;
  color: #fff;
}

/* .game-about h2 {
        margin-top: 0;
        font-size: 1.5rem;
    } */

/* ================ 
       SIDEBAR 
       ================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.game-sidebar {
  position: sticky;
  top: 42px;
  align-self: start;
}

.sidebar-ad {
  margin-bottom: 30px;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
}

.sidebar-ad h3 {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px 0;
  text-transform: uppercase;
}

/* ADS STYLE */
.ad-container {
  margin: 1.5rem 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f8f8;
}

.ad-main_top {
  margin-bottom: 2rem;
}

.ad-main_bottom {
  margin-top: 2rem;
}

.ad-sidebar_top {
  margin-bottom: 1.5rem;
}

.ad-sidebar_bottom {
  margin-top: 1.5rem;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 1rem;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  border: 1px dashed #ddd;
}

@media (max-width: 768px) {
  .ad-container {
    margin: 1rem auto;
    max-width: 100%;
  }

  .ad-sidebar_top,
  .ad-sidebar_bottom {
    float: none;
    text-align: center;
  }
}

/* Popular Games Widget */
.sidebar-widget {
  margin-bottom: 30px;
}

.widget-title {
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-text-subtle);
}

.popular-games-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.popular-games-list a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.single-game-thumbnail {
  width: 100%;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0;
}

.single-game-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================ 
   GooglePlay & Appstore Buttons
   ================ */
.app-buttons {
  border-top: 1px solid var(--color-text-subtle);
  padding-top: 2rem;
}

.store-button img {
  height: 50px;
}

/* ================ 
   SINGLE GAME PAGE 
   ================ */

.game-header {
  margin-bottom: 1rem;
}

.game-single {
  margin: var(--space-xl) 0;
}

.game-player {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.game-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.game-description {
  margin-bottom: var(--space-lg);
  border-top: 1px solid var(--color-text-subtle);
  padding-top: 2rem;
}

/* Game Embed Container */
.mobile-game-preview {
  text-align: center;
  padding: 20px;
}

.embed-game-thumbnail {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 15px;
  box-shadow: 0 0 90px 0 #000;
}

.embed-game-title {
  font-size: 2rem;
}

.play-game-button {
  background: var(--primary);
  font: inherit;
  color: var(--color-white);
  border: none;
  padding: 12px 100px;
  font-size: 21px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 10px;
}

.embed-container {
  position: relative;
  width: 100%;
  height: 0;
  overflow: hidden;
}

/* adapt game on mobile */
@media (max-width: 768px) {
  .embed-container {
    padding-bottom: 0 !important;
    height: 100%;
  }
}

/* Narrower on large screens (desktops) */
@media (min-width: 1024px) {
  .embed-container {
    max-width: 900px;
    height: 500px;
    padding-bottom: 0 !important;
    margin: 0 auto;
  }

  .embed-container iframe {
    width: 100%;
    height: 100%;
  }
}

.embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.game-loading,
.game-error {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: var(--color-bg-inputs);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.retry-button {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 100px;
}

.loading-tip {
  text-align: center;
}

.game-not-available {
  padding: var(--space-lg);
  text-align: center;
  background: #ffebee;
  color: #c62828;
  border-radius: var(--radius-md);
}

/* Game Taxonomies */
.game-taxonomies-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

footer.game-footer {
  display: flex;
  margin-bottom: 2rem;
}

.game-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-taxonomy-link {
  background-color: var(--color-bg-inputs);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.4s;
  cursor: pointer;
}

.game-taxonomy-link:hover {
  background-color: var(--primary);
  color: var(--color-white);
}

/* Game Rating */
.game-rating,
.release-date {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.release-date {
  margin-top: 1rem;
}

.single-light-text {
  color: var(--light-white);
}

.game-rating .stars {
  color: gold;
  letter-spacing: 2px;
}

.game-rating .score {
  font-weight: bold;
}

.game-votes {
  color: var(--light-white);
  font-size: 0.8rem;
}

/* ================ 
   RESPONSIVE 
   ================ */
@media (max-width: 1024px) {
  :root {
    --text-scale: 1.2;
  }
}

@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .game-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --text-scale: 1.15;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
  }
}
