/* ═══════════════════════════════════════════════
   GamesOnlineMobile — Premium Dark UI 2026
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700;800;900&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Variables ─────────────────────────────────── */
:root {
  --bg:         #060912;
  --bg2:        #0d1117;
  --bg3:        #111827;
  --bg4:        #1a2332;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(108,99,255,0.3);
  --accent:     #6c63ff;
  --accent2:    #00d4aa;
  --accent3:    #ff6b9d;
  --text:       #f0f4ff;
  --text2:      #8892a4;
  --text3:      #4a5568;
  --card-r:     16px;
  --glow:       0 0 40px rgba(108,99,255,0.15);
  --glow2:      0 0 40px rgba(0,212,170,0.15);
  --trans:      all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(108,99,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,212,170,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; position: relative; }

/* ── Header ─────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,9,18,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(108,99,255,0.4);
}
.site-logo span {
  font-family: 'Exo 2', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.site-logo span span { color: var(--accent2); }

/* Search */
.header-search {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}
#site-search {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--trans);
}
#site-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
#site-search::placeholder { color: var(--text3); }

/* Nav */
.header-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-cat-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text2);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--trans);
  white-space: nowrap;
}
.nav-cat-btn:hover, .nav-cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.nav-contact-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  border-radius: 100px;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--trans);
  box-shadow: 0 4px 15px rgba(108,99,255,0.25);
  border: 1px solid rgba(255,255,255,0.1);
}
.nav-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108,99,255,0.45);
  filter: brightness(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: var(--trans);
}
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent2);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent2);
}

/* Mobile nav */
#mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
#mobile-nav.open {
  display: flex;
}
#mobile-nav .nav-cat-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: var(--trans);
}
#mobile-nav .nav-cat-btn:hover, #mobile-nav .nav-cat-btn.active {
  background: rgba(108, 99, 255, 0.12);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Hero ───────────────────────────────────────── */
#hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-badge span.rainbow-text {
  background: linear-gradient(to right, #ff6b9d, #6c63ff, #00d4aa, #ff6b9d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 3s linear infinite;
}
@keyframes rainbow-shift {
  to { background-position: 200% center; }
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent2);
  animation: pulse 2s infinite;
}
#hero h1 {
  font-family: 'Exo 2', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
#hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#hero p {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: 'Exo 2', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat .label {
  font-size: 0.8rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ── Ad unit ────────────────────────────────────── */
.ad-unit-wrap {
  padding: 10px 0;
  text-align: center;
}
.ad-placeholder {
  height: 90px;
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 0.78rem;
}

/* ── Filter Bar ─────────────────────────────────── */
#filter-bar {
  position: sticky;
  top: 69px;
  z-index: 90;
  background: rgba(6,9,18,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.filter-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--text2);
  font-size: 0.84rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--trans);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), #8b7ff7);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}

/* ── Games Grid ─────────────────────────────────── */
#games-section { padding: 40px 0 80px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}
.section-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.game-count {
  font-size: 0.75rem;
  color: var(--text3);
  background: var(--bg3);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

#filter-bar {
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 70px;
  z-index: 40;
  margin-bottom: 20px;
}
.filter-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.filter-inner::-webkit-scrollbar { display: none; } /* Hide scrollbar for Chrome/Safari */

.filter-btn {
  padding: 8px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text2);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

#games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* ── Game Card ──────────────────────────────────── */
.game-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
  overflow: hidden;
  cursor: pointer;
  transition: var(--trans);
  animation: fadeUp 0.5s ease both;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px rgba(108,99,255,0.2);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.game-card-thumb {
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thumb-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.15), transparent);
}
.game-icon {
  font-size: 3.2rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(108,99,255,0.5));
  transition: transform 0.3s ease;
}
.game-card:hover .game-icon { transform: scale(1.15) rotate(-5deg); }
.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f7a23a, #ff6b9d);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}
.game-card-body { padding: 14px 16px 16px; }
.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cat-badge {
  font-size: 0.7rem;
  color: var(--accent2);
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.2);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}
.play-count {
  font-size: 0.7rem;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}
.game-card-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}
.game-card-desc {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.play-btn {
  width: 100%;
  padding: 9px;
  background: linear-gradient(135deg, var(--accent), #8b7ff7);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--trans);
  letter-spacing: 0.3px;
}
.play-btn:hover {
  box-shadow: 0 6px 20px rgba(108,99,255,0.45);
  transform: translateY(-1px);
}

/* ── No Results ─────────────────────────────────── */
#no-results {
  display: none;
  text-align: center;
  padding: 80px 20px;
  grid-column: 1/-1;
}
#no-results.visible { display: block; }
.no-res-icon { font-size: 3rem; margin-bottom: 16px; }
#no-results h3 { font-size: 1.3rem; margin-bottom: 8px; }
#no-results p { color: var(--text2); }

/* ── Game Modal ─────────────────────────────────── */
#game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
#game-modal.open { display: block; }
#modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,9,18,0.92);
  backdrop-filter: blur(8px);
}
#modal-box {
  position: absolute;
  inset: 16px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), var(--glow);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
#modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#modal-icon { font-size: 1.6rem; }
#modal-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  flex: 1;
}
.badge { padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 600; }
.badge-blue { background: rgba(108,99,255,0.15); color: var(--accent); border: 1px solid rgba(108,99,255,0.3); }
#modal-close {
  width: 34px;
  height: 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-close:hover { background: #ff4757; color: #fff; border-color: #ff4757; }
#game-frame-wrap { flex: 1; overflow: hidden; position: relative; }
#game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
#modal-ad-top { text-align: center; padding: 4px 20px; }
#modal-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
#modal-instructions { font-size: 0.8rem; color: var(--text2); flex: 1; }
.modal-link-btn {
  padding: 7px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--trans);
  white-space: nowrap;
}
.modal-link-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ─────────────────────────────────────── */
#site-footer {
  background: #060912 !important; /* Solid dark background */
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  position: relative !important;
  z-index: 9999 !important; /* Above everything else */
  width: 100%;
  display: block !important;
  clear: both !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand .site-logo { 
  margin-bottom: 14px; 
  pointer-events: all; 
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-family: 'Exo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
.footer-brand .tagline { font-size: 0.85rem; color: var(--text2); line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-family: 'Exo 2', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: 12px;
  transition: var(--trans);
}
.footer-col a:hover { color: var(--accent2); padding-left: 5px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text3); }
.footer-social { display: flex; gap: 12px; }
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--trans);
}
.social-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }

/* Also fix other sections that sit on body::before */
#hero, #filter-bar, #games-section, main, .page-main, .page-hero {
  position: relative;
  z-index: 1;
}

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

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .hero-stats { grid-template-columns: 1fr; gap: 15px; }
  #hero h1 { font-size: 2.2rem; }
  #filter-bar { top: 60px; }
}
@media (max-width: 600px) {
  #hero { padding: 50px 0 30px; }
  #games-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .header-inner { justify-content: space-between; }
  .header-search { order: 3; width: 100%; max-width: 100%; margin-top: 10px; }
  .logo-hide-mobile { display: none; }
}
@media (max-width: 400px) {
  #games-grid { grid-template-columns: 1fr 1fr; }
  .game-card-thumb { height: 110px; }
  .game-icon { font-size: 2.6rem; }
}

/* ─── Premium Game Page Styles ─────────────────── */
.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 24px;
}
.breadcrumb-nav a {
  color: var(--text2);
  text-decoration: none;
  transition: var(--trans);
}
.breadcrumb-nav a:hover {
  color: var(--game-accent, var(--accent));
}
.bc-sep {
  color: var(--border);
}
.bc-current {
  color: var(--text);
  font-weight: 500;
}

.game-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  transition: all 0.4s ease;
}

.game-card-container {
  background: var(--bg2);
  border: 1px solid color-mix(in srgb, var(--game-accent, var(--accent)) 25%, var(--border));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px color-mix(in srgb, var(--game-accent, var(--accent)) 5%, transparent);
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

.game-frame-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
.game-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.game-header-icon {
  font-size: 3rem;
  line-height: 1;
}
.game-header-title {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.game-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}
.game-header-category {
  background: color-mix(in srgb, var(--game-accent, var(--accent)) 10%, transparent);
  color: var(--game-accent, var(--accent));
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border: 1px solid color-mix(in srgb, var(--game-accent, var(--accent)) 20%, transparent);
}
.game-header-plays {
  color: var(--accent2);
  font-weight: 500;
}

/* Orientation-Aware Dynamic Grid & Iframe Layout */
.game-iframe-outer {
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.game-iframe-outer.aspect-landscape {
  aspect-ratio: 16/9;
}

.game-iframe-outer.aspect-portrait {
  aspect-ratio: 3/4;
  max-width: 500px;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.game-iframe-outer.aspect-square {
  aspect-ratio: 1/1;
  max-width: 600px;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

@media (max-width: 768px) {
  .game-iframe-outer.aspect-portrait {
    aspect-ratio: 9/16;
    max-width: 100%;
    border-left: none;
    border-right: none;
  }
  .game-iframe-outer.aspect-square {
    max-width: 100%;
    border-left: none;
    border-right: none;
  }
}

.game-iframe-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Fullscreen implementation */
.game-iframe-wrapper:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.game-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 14, 26, 0.5);
  gap: 16px;
  flex-wrap: wrap;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--trans);
  outline: none;
}
.control-btn:hover {
  background: var(--border);
  color: var(--text);
  border-color: var(--game-accent, var(--accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--game-accent, var(--accent)) 30%, transparent);
  transform: translateY(-2px);
}
.control-btn:active {
  transform: translateY(0);
}
.control-icon {
  font-size: 1.1rem;
}

.rating-controls {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.rating-controls .rating-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 18px;
}
.rating-controls .rating-btn:first-child {
  border-right: 1px solid var(--border);
}
.rating-controls .rating-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: none;
}
.rating-controls .rating-btn.active[data-action="like"] {
  color: var(--accent2) !important;
  background: rgba(0, 212, 170, 0.1) !important;
}
.rating-controls .rating-btn.active[data-action="dislike"] {
  color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.1) !important;
}

/* Cinematic Focus Mode Elements */
.focus-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 10, 0.95);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
body.focus-mode-active .focus-overlay {
  opacity: 1;
  pointer-events: auto;
}
body.focus-mode-active #game-card-container {
  position: relative;
  z-index: 999;
  border-color: var(--game-accent, var(--accent));
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 50px color-mix(in srgb, var(--game-accent, var(--accent)) 25%, transparent);
  transform: scale(1.02);
}
body.focus-mode-active #site-header,
body.focus-mode-active .breadcrumb-nav,
body.focus-mode-active .game-article-card,
body.focus-mode-active .related-section,
body.focus-mode-active .game-sidebar-col,
body.focus-mode-active #site-footer {
  pointer-events: none;
}
.focus-btn-active {
  background: var(--game-accent, var(--accent)) !important;
  color: #000 !important;
  border-color: var(--game-accent, var(--accent)) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 15px color-mix(in srgb, var(--game-accent, var(--accent)) 50%, transparent);
}

/* SEO Article Card styling */
.game-article-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.premium-article {
  line-height: 1.8;
  color: var(--text2);
}
.article-h1 {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}
.article-body-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 16px;
  font-family: 'Exo 2', sans-serif;
}
.article-body-content p {
  margin-bottom: 16px;
  font-size: 0.98rem;
}
.article-body-content ul, .article-body-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}
.article-body-content li {
  margin-bottom: 8px;
}
.article-body-content strong {
  color: var(--text);
}

/* Related Games Section styling */
.related-section {
  margin-top: 40px;
  margin-bottom: 32px;
}
.section-subtitle {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: var(--trans);
}
.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--game-accent, var(--accent));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--game-accent, var(--accent)) 15%, transparent);
}
.related-card-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.related-icon {
  font-size: 1.8rem;
}
.related-card-body {
  flex: 1;
  min-width: 0;
}
.related-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}
.related-cat {
  color: var(--text3);
}
.related-plays {
  color: var(--accent2);
}

/* Sidebar styling */
.sidebar-widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.widget-title {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 20px;
}
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: var(--trans);
}
.trending-item:hover {
  background: var(--border);
  border-color: var(--game-accent, var(--accent));
  transform: translateX(4px);
}
.trending-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.trending-icon {
  font-size: 1.4rem;
}
.trending-title {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trending-arrow {
  color: var(--text3);
  font-weight: 700;
  transition: var(--trans);
}
.trending-item:hover .trending-arrow {
  color: var(--accent2);
}

.ad-widget {
  text-align: center;
}
.ad-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text3);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive Styles for Game page */
@media (max-width: 1024px) {
  .game-page-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
  .game-card-container {
    border-radius: 16px;
  }
  .game-frame-header {
    padding: 16px;
  }
  .game-header-title {
    font-size: 1.4rem;
  }
  .game-controls-bar {
    padding: 12px 16px;
  }
  .game-article-card {
    padding: 24px;
  }
}
@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
  .game-controls-bar {
    justify-content: center;
  }
}

.comment-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .comment-fields-grid {
    grid-template-columns: 1fr;
  }
}
