/* ========================================================
   IndiaGames - Main Stylesheet
   Color Palette: Indian Saffron / Gold Theme
   ======================================================== */

@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 Variables ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-0: #06060F;
  --bg-1: #0C0C1E;
  --bg-2: #121228;
  --bg-card: #161630;
  --bg-card-hover: #1C1C3A;
  --bg-sidebar: #0A0A1C;
  --bg-header: rgba(6, 6, 15, 0.96);
  --bg-input: #1A1A38;

  /* Accent Colors — Saffron/Gold Theme */
  --orange: #FF6B00;
  --orange-light: #FF8C30;
  --orange-glow: rgba(255, 107, 0, 0.35);
  --gold: #FFB300;
  --gold-light: #FFCC44;

  /* Badge Colors */
  --badge-hot: #FF3D5A;
  --badge-new: #00E5CC;
  --badge-top: #7C4DFF;
  --badge-trending: #FF9800;
  --badge-updated: #29B6F6;

  /* Text */
  --t1: #FFFFFF;
  --t2: #C8C8E8;
  --t3: #7878A8;
  --t4: #3A3A60;

  /* UI */
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 107, 0, 0.5);
  --divider: rgba(255, 255, 255, 0.04);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-orange: 0 0 30px rgba(255,107,0,0.3);
  --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,107,0,0.25);

  /* Layout */
  --sidebar-w: 220px;
  --sidebar-collapsed: 62px;
  --header-h: 62px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s cubic-bezier(0.4,0,0.2,1);
  --t-slow: 0.4s cubic-bezier(0.4,0,0.2,1);
  --t-bounce: 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--t1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2A2A50; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ── Keyframe Animations ────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.85; }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 10px var(--orange-glow); }
  50%      { box-shadow: 0 0 25px var(--orange-glow), 0 0 50px rgba(255,107,0,0.15); }
}
@keyframes floatBadge {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes bgGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes starPop {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}
@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Layout Wrapper ─────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: width var(--t-slow), transform var(--t-slow);
  overflow: hidden;
}
.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
}
.sidebar-toggle {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--t3);
  flex-shrink: 0;
  transition: color var(--t-fast), background var(--t-fast);
}
.sidebar-toggle:hover { color: var(--t1); background: var(--bg-2); }
.sidebar-toggle svg { width: 18px; height: 18px; }

.logo {
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  opacity: 1; transition: opacity var(--t-base);
}
.sidebar.collapsed .logo { opacity: 0; pointer-events: none; }
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 2px 12px var(--orange-glow);
}
.logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 20px;
  background: linear-gradient(135deg, var(--orange-light), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar Nav */
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section { margin-bottom: 16px; }
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--t4); text-transform: uppercase;
  padding: 4px 10px 8px;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--t-base);
}
.sidebar.collapsed .nav-section-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--t3);
  cursor: pointer;
  position: relative;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover {
  color: var(--t1);
  background: rgba(255,107,0,0.08);
  transform: translateX(2px);
}
.nav-item.active {
  color: var(--orange);
  background: rgba(255,107,0,0.12);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
}
.nav-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 22px; text-align: center;
  transition: transform var(--t-bounce);
}
.nav-item:hover .nav-icon { transform: scale(1.2); }
.nav-label {
  font-size: 13px; font-weight: 500;
  opacity: 1; transition: opacity var(--t-base);
}
.sidebar.collapsed .nav-label { opacity: 0; }
.nav-count {
  margin-left: auto;
  background: rgba(255,107,0,0.15);
  color: var(--orange);
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 20px;
  flex-shrink: 0;
  transition: opacity var(--t-base);
}
.sidebar.collapsed .nav-count { opacity: 0; }

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; left: 62px; top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  color: var(--t1);
  font-size: 12px; font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 200;
  pointer-events: none;
  animation: fadeIn var(--t-fast) ease;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}
.sidebar-promo {
  background: linear-gradient(135deg, rgba(255,107,0,0.12), rgba(255,179,0,0.08));
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--t-base);
}
.sidebar.collapsed .sidebar-promo { opacity: 0; }
.sidebar-promo .promo-icon { font-size: 22px; margin-bottom: 4px; }
.sidebar-promo .promo-text { font-size: 11px; font-weight: 600; color: var(--orange-light); }
.sidebar-promo .promo-sub { font-size: 10px; color: var(--t3); margin-top: 2px; }

/* ── Header ──────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  z-index: 90;
  transition: left var(--t-slow);
}
.sidebar.collapsed ~ .main-content .header,
body.sidebar-collapsed .header {
  left: var(--sidebar-collapsed);
}

/* Search */
.search-wrapper {
  flex: 1; max-width: 500px;
  position: relative;
}
.search-input {
  width: 100%; height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--t1);
  font-size: 13px;
  padding: 0 40px 0 38px;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
.search-input:focus {
  border-color: var(--border-active);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.1);
}
.search-input::placeholder { color: var(--t3); }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--t3); font-size: 14px; pointer-events: none;
  transition: color var(--t-fast);
}
.search-input:focus + .search-icon,
.search-wrapper:focus-within .search-icon { color: var(--orange); }
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--t3); font-size: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast);
}
.search-input:not(:placeholder-shown) ~ .search-clear { opacity: 1; pointer-events: auto; }

/* Search Results Dropdown */
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 380px; overflow-y: auto;
  z-index: 200;
  display: none;
  animation: slideDown 0.2s ease;
}
.search-dropdown.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-result-item:hover { background: rgba(255,107,0,0.08); }
.search-result-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: 600; color: var(--t1); }
.search-result-cat { font-size: 11px; color: var(--t3); }
.search-result-badge { font-size: 11px; color: var(--orange); font-weight: 600; }
.search-no-results { padding: 20px; text-align: center; color: var(--t3); font-size: 13px; }

/* Header Actions */
.header-actions {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.header-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t2);
  font-size: 16px;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-bounce);
  position: relative;
}
.header-btn:hover {
  color: var(--t1); background: var(--bg-2);
  transform: scale(1.1);
}
.header-btn .badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--badge-hot);
  border-radius: 50%;
  border: 1.5px solid var(--bg-0);
  animation: pulse 2s infinite;
}

/* Login Button */
.btn-login {
  height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: white;
  font-size: 13px; font-weight: 600;
  padding: 0 18px;
  border-radius: 20px;
  box-shadow: 0 2px 12px var(--orange-glow);
  transition: transform var(--t-bounce), box-shadow var(--t-base), opacity var(--t-fast);
  flex-shrink: 0;
}
.btn-login:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px var(--orange-glow);
}
.btn-login:active { transform: scale(0.97); opacity: 0.9; }

/* ── Main Content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left var(--t-slow);
}
.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
}
.content-area {
  padding-top: var(--header-h);
}

/* ── Hero Banner ────────────────────────────────────────── */
.hero-banner {
  margin: 20px 20px 0;
  padding: 28px 36px;
  background: linear-gradient(135deg, #1A0800, #2A1200, #180020, #0A1030);
  background-size: 400% 400%;
  animation: bgGradient 8s ease infinite;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,107,0,0.15);
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(255,107,0,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(255,179,0,0.08) 0%, transparent 60%);
}
.hero-banner::after {
  content: '🎮';
  position: absolute; right: -20px; top: 50%;
  transform: translateY(-50%);
  font-size: 140px; opacity: 0.06;
  filter: blur(2px);
}

.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, #FFFFFF, var(--orange-light), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.hero-sub { font-size: 14px; color: var(--t2); margin-bottom: 20px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.hero-stat {
  display: flex; align-items: center; gap: 10px;
  animation: fadeInLeft 0.5s ease both;
}
.hero-stat:nth-child(2) { animation-delay: 0.1s; }
.hero-stat:nth-child(3) { animation-delay: 0.2s; }
.hero-stat:nth-child(4) { animation-delay: 0.3s; }
.hero-stat-icon {
  width: 38px; height: 38px;
  background: rgba(255,107,0,0.12);
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.hero-stat-text strong {
  display: block;
  font-size: 16px; font-weight: 700; color: var(--orange-light);
}
.hero-stat-text span {
  font-size: 11px; color: var(--t3);
}

/* ── Section Styles ─────────────────────────────────────── */
.section {
  padding: 24px 20px 8px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--t1);
}
.section-title-icon { font-size: 20px; }
.section-view-more {
  font-size: 12px; font-weight: 600;
  color: var(--orange);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,107,0,0.25);
  transition: background var(--t-fast), transform var(--t-bounce);
}
.section-view-more:hover {
  background: rgba(255,107,0,0.12);
  transform: scale(1.05);
}

/* ── Game Row (Horizontal Scroll) ───────────────────────── */
.game-row {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.game-row::-webkit-scrollbar { height: 4px; }
.game-row::-webkit-scrollbar-thumb { background: rgba(255,107,0,0.3); border-radius: 2px; }
.game-row::after {
  content: '';
  flex-shrink: 0;
  width: 4px;
}

/* ── Game Card ──────────────────────────────────────────── */
.game-card {
  flex-shrink: 0;
  width: 160px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform var(--t-bounce);
  animation: fadeInUp 0.4s ease both;
}
.game-card:nth-child(2) { animation-delay: 0.04s; }
.game-card:nth-child(3) { animation-delay: 0.08s; }
.game-card:nth-child(4) { animation-delay: 0.12s; }
.game-card:nth-child(5) { animation-delay: 0.16s; }
.game-card:nth-child(6) { animation-delay: 0.20s; }
.game-card:nth-child(7) { animation-delay: 0.24s; }
.game-card:nth-child(8) { animation-delay: 0.28s; }

.game-card:hover { transform: translateY(-6px) scale(1.02); }

.game-thumb {
  width: 100%; aspect-ratio: 4/3;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.game-card:hover .game-thumb {
  border-color: rgba(255,107,0,0.4);
  box-shadow: var(--shadow-card-hover);
}

.game-thumb-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ── Real Thumbnail Image ─────────────────────────────── */
.game-thumb-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: inherit;
  transition: transform 0.5s ease;
}
.game-card:hover .game-thumb-img { transform: scale(1.08); }

.game-thumb-icon {
  font-size: 42px;
  position: relative; z-index: 2;
  transition: transform var(--t-bounce);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
/* Hide icon when real thumbnail loaded */
.has-thumb .game-thumb-icon { opacity: 0; }
.game-card:hover .game-thumb-icon { transform: scale(1.15) rotate(5deg); }

/* Thumb Pattern Overlay */
.game-thumb-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
  z-index: 1;
}
.game-thumb-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px,
      transparent 1px, transparent 10px
    );
  z-index: 0;
}
.has-thumb .game-thumb-bg::before,
.has-thumb .game-thumb-bg::after { display: none; }

/* ── Hover Preview ───────────────────────────────────── */
@keyframes previewFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes thumbZoom {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.15); }
}

/* CSS-animated preview (games without a video) */
.game-preview {
  position: absolute; inset: 0;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.0);
  transform-origin: center;
}
.game-card:hover .game-preview {
  opacity: 1;
}
/* Thumbnail games: smooth zoom on hover */
.game-card:hover .game-preview[style*="background-image"] {
  animation: thumbZoom 4s ease-in-out infinite alternate;
}

/* ── Actual gameplay video preview ──────────────────── */
.game-preview-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.game-card:hover .game-preview-video {
  opacity: 1;
  animation: previewFadeIn 0.35s ease forwards;
}

/* Runner preview (Subway Surfers, Temple Run, etc.) */
.prev-runner {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.prev-runner::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 28px,
    rgba(255,255,255,0.06) 28px, rgba(255,255,255,0.06) 30px
  );
  animation: runnerScroll 0.4s linear infinite;
}
.prev-runner::after {
  content: '🏃';
  position: absolute;
  bottom: 30%; left: 50%; transform: translateX(-50%);
  font-size: 28px;
  animation: runnerBounce 0.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.8));
}
@keyframes runnerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-30px); }
}
@keyframes runnerBounce {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-50%) translateY(-8px); }
}

/* IO / Snake preview */
.prev-io {
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #050510 100%);
}
.prev-io::before {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
  top: 50%; left: 50%;
  animation: ioOrbit 1.2s linear infinite;
}
.prev-io::after {
  content: '🐍';
  position: absolute;
  font-size: 32px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: ioWiggle 0.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(100,255,100,0.6));
}
@keyframes ioOrbit {
  0%   { transform: translate(-50%, -50%) translate(30px, 0); opacity: 0.8; }
  25%  { transform: translate(-50%, -50%) translate(0, 30px); }
  50%  { transform: translate(-50%, -50%) translate(-30px, 0); }
  75%  { transform: translate(-50%, -50%) translate(0, -30px); }
  100% { transform: translate(-50%, -50%) translate(30px, 0); opacity: 0.8; }
}
@keyframes ioWiggle {
  from { transform: translate(-50%, -50%) rotate(-15deg); }
  to   { transform: translate(-50%, -50%) rotate(15deg); }
}

/* Match-3 preview (Candy Crush, Bubble Shooter, etc.) */
.prev-match3 {
  background: linear-gradient(135deg, #1a0533 0%, #2d0a47 100%);
}
.prev-match3::before {
  content: '💎🔴🟡💎🔵🟢🔴💎🟡🔵🟢🔴💎🔵🟡🟢';
  position: absolute;
  inset: 0;
  display: flex; flex-wrap: wrap;
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1.4;
  overflow: hidden;
  align-content: flex-start;
  padding: 4px;
  animation: match3Fall 1s ease-in infinite;
  opacity: 0.85;
}
@keyframes match3Fall {
  0%   { transform: translateY(-20px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Cards / Board preview */
.prev-cards {
  background: linear-gradient(135deg, #0a2a0a 0%, #1a4a1a 100%);
  display: flex; align-items: center; justify-content: center;
}
.prev-cards::before {
  content: '🃏♠️♥️';
  font-size: 28px;
  position: absolute;
  top: 50%; left: 50%;
  animation: cardSpin 1s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}
.prev-cards::after {
  content: '🎴';
  font-size: 22px;
  position: absolute;
  top: 30%; right: 25%;
  animation: cardSpin 1s ease-in-out infinite reverse;
  opacity: 0.7;
}
@keyframes cardSpin {
  0%, 100% { transform: translate(-50%, -50%) rotateY(0deg); }
  50%       { transform: translate(-50%, -50%) rotateY(180deg); }
}

/* Racing preview */
.prev-racing {
  background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 40%, #333 50%, #1a1a1a 60%, #0d0d0d 100%);
  overflow: hidden;
}
.prev-racing::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      transparent 48%, white 49%, white 51%, transparent 52%
    ),
    repeating-linear-gradient(180deg,
      transparent 0px, transparent 18px,
      rgba(255,255,255,0.6) 18px, rgba(255,255,255,0.6) 22px,
      transparent 22px, transparent 40px
    );
  width: 8px; left: 50%;
  animation: roadRush 0.3s linear infinite;
}
.prev-racing::after {
  content: '🏎️';
  position: absolute;
  bottom: 25%; left: 50%;
  font-size: 28px;
  transform: translateX(-50%);
  animation: racingShake 0.1s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(255,107,0,0.8));
}
@keyframes roadRush {
  from { transform: translateY(-40px); }
  to   { transform: translateY(0); }
}
@keyframes racingShake {
  from { transform: translateX(-52%); }
  to   { transform: translateX(-48%); }
}

/* Puzzle preview */
.prev-puzzle {
  background: linear-gradient(135deg, #0a1a2e 0%, #0d2137 100%);
}
.prev-puzzle::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,107,0,0.1) 0px, rgba(255,107,0,0.1) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,107,0,0.1) 0px, rgba(255,107,0,0.1) 1px, transparent 1px, transparent 40px);
  animation: puzzleShift 2s ease-in-out infinite alternate;
}
.prev-puzzle::after {
  content: '🧩';
  font-size: 36px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: puzzleBounce 0.8s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 12px rgba(255,179,0,0.6));
}
@keyframes puzzleShift {
  from { transform: translate(0, 0); }
  to   { transform: translate(5px, 5px); }
}
@keyframes puzzleBounce {
  from { transform: translate(-50%, -55%) rotate(-10deg); }
  to   { transform: translate(-50%, -45%) rotate(10deg); }
}

/* Sports preview */
.prev-sport {
  background: radial-gradient(ellipse at center bottom, #1a3a1a 0%, #0a1a0a 100%);
}
.prev-sport::after {
  content: '⚽';
  font-size: 32px;
  position: absolute;
  bottom: 20%; left: 50%;
  transform: translateX(-50%);
  animation: sportBounce 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) infinite alternate;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.5));
}
@keyframes sportBounce {
  from { transform: translateX(-50%) translateY(0) rotate(0deg); }
  to   { transform: translateX(-50%) translateY(-30px) rotate(180deg); }
}

/* Battle / Action preview */
.prev-battle {
  background: linear-gradient(135deg, #1a0000 0%, #2d0000 100%);
}
.prev-battle::before {
  content: '⚔️';
  font-size: 36px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: battleClash 0.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 16px rgba(255,50,0,0.8));
}
.prev-battle::after {
  content: '✨';
  font-size: 24px;
  position: absolute;
  top: 30%; left: 60%;
  animation: sparklePop 0.4s ease-out infinite;
  opacity: 0;
}
@keyframes battleClash {
  from { transform: translate(-55%, -50%) rotate(-15deg); }
  to   { transform: translate(-45%, -50%) rotate(15deg); }
}
@keyframes sparklePop {
  0%  { transform: scale(0); opacity: 1; }
  100%{ transform: scale(1.5); opacity: 0; }
}

/* Word game preview */
.prev-word {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
}
.prev-word::before {
  content: 'W O R D';
  position: absolute;
  top: 30%; left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: 8px;
  animation: wordGlow 1s ease-in-out infinite alternate;
  white-space: nowrap;
}
.prev-word::after {
  content: '🔤';
  font-size: 28px;
  position: absolute;
  bottom: 25%; left: 50%;
  transform: translateX(-50%);
  animation: wordBounce 0.7s ease-in-out infinite alternate;
}
@keyframes wordGlow {
  from { text-shadow: 0 0 8px var(--gold); opacity: 0.7; }
  to   { text-shadow: 0 0 20px var(--gold), 0 0 40px var(--orange); opacity: 1; }
}
@keyframes wordBounce {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-50%) translateY(-8px); }
}

/* Farm / Idle preview */
.prev-farm {
  background: linear-gradient(180deg, #1a3d00 0%, #2d5a00 50%, #8B4513 100%);
}
.prev-farm::after {
  content: '🌾🌻🌾';
  font-size: 24px;
  position: absolute;
  bottom: 20%; left: 50%;
  transform: translateX(-50%);
  animation: farmWave 1s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
@keyframes farmWave {
  from { transform: translateX(-50%) rotate(-5deg); }
  to   { transform: translateX(-50%) rotate(5deg); }
}

/* Casual / Pet game preview */
.prev-casual {
  background: radial-gradient(ellipse at center, #1a0a2e 0%, #2a0a3e 100%);
}
.prev-casual::after {
  content: '😸';
  font-size: 40px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: casualBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(255,107,0,0.4));
}
@keyframes casualBounce {
  from { transform: translate(-50%, -50%) scale(0.85); }
  to   { transform: translate(-50%, -50%) scale(1.15); }
}

/* Stickman / Action preview */
.prev-stickman {
  background: linear-gradient(180deg, #87CEEB 0%, #4682B4 40%, #228B22 38%, #228B22 100%);
  opacity: 0.9;
}
.prev-stickman::after {
  content: '🧗';
  font-size: 34px;
  position: absolute;
  bottom: 30%; left: 50%;
  transform: translateX(-50%);
  animation: stickmanSwing 0.5s ease-in-out infinite alternate;
}
@keyframes stickmanSwing {
  from { transform: translateX(-70%) rotate(-20deg); }
  to   { transform: translateX(-30%) rotate(20deg); }
}

/* Physics / Ball preview */
.prev-physics {
  background: linear-gradient(135deg, #0a0a2e 0%, #1a1a4e 100%);
}
.prev-physics::after {
  content: '⚪';
  font-size: 30px;
  position: absolute;
  left: 50%;
  animation: physicsBall 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) infinite alternate;
}
@keyframes physicsBall {
  from { bottom: 20%; transform: translateX(-50%) scale(1); }
  to   { bottom: 60%; transform: translateX(-50%) scale(0.9); }
}

/* Cricket special preview */
.prev-cricket {
  background: linear-gradient(180deg, #87CEEB 0%, #228B22 60%, #8B4513 100%);
}
.prev-cricket::after {
  content: '🏏';
  font-size: 34px;
  position: absolute;
  bottom: 25%; left: 50%;
  transform: translateX(-50%);
  animation: cricketSwing 0.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
@keyframes cricketSwing {
  from { transform: translateX(-50%) rotate(-30deg); }
  to   { transform: translateX(-50%) rotate(10deg); }
}

/* Hover Overlay */
.game-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--t-base);
  z-index: 3;
  border-radius: var(--radius);
}
.game-card:hover .game-thumb-overlay { opacity: 1; }
.play-btn {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px var(--orange-glow);
  transform: scale(0.7);
  transition: transform var(--t-bounce);
}
.game-card:hover .play-btn { transform: scale(1); }

/* Badge */
.game-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 4;
  animation: floatBadge 2s ease-in-out infinite;
}
.badge-hot    { background: var(--badge-hot);     color: white; }
.badge-new    { background: var(--badge-new);     color: #001A15; }
.badge-top    { background: var(--badge-top);     color: white; }
.badge-trending { background: var(--badge-trending); color: white; }
.badge-updated { background: var(--badge-updated); color: white; }

/* Players Badge */
.game-players-badge {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  font-size: 9px; color: var(--t2);
  padding: 2px 6px; border-radius: 10px;
  z-index: 4;
}

/* Card Info */
.game-info {
  padding: 8px 2px 4px;
}
.game-title {
  font-size: 12px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-fast);
  margin-bottom: 3px;
}
.game-card:hover .game-title { color: var(--orange-light); }
.game-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--t3);
}
.game-rating {
  display: flex; align-items: center; gap: 2px;
  color: var(--gold);
}
.game-category-tag {
  background: var(--bg-2);
  padding: 1px 6px; border-radius: 6px;
  font-size: 9px; color: var(--t3);
}

/* ── Featured Game Card (Large) ─────────────────────────── */
.game-card-featured {
  flex-shrink: 0;
  width: 220px;
  cursor: pointer;
  transition: transform var(--t-bounce);
  animation: fadeInUp 0.4s ease both;
}
.game-card-featured:hover { transform: translateY(-8px) scale(1.02); }
.game-card-featured .game-thumb { aspect-ratio: 16/10; }
.game-card-featured .game-thumb-icon { font-size: 56px; }
.game-card-featured .game-title { font-size: 14px; }
.game-card-featured .play-btn { width: 56px; height: 56px; font-size: 24px; }

/* ── Game Grid (For "All Games" / Search Results) ─────── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 0 20px;
}
.game-grid .game-card { width: 100%; }

/* ── Top 10 List ────────────────────────────────────────── */
.top-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 0;
}
.top-list-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-bounce);
  animation: fadeInLeft 0.4s ease both;
}
.top-list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateX(4px);
}
.top-rank {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px; font-weight: 700;
  min-width: 30px; text-align: center;
  color: var(--t4);
}
.top-rank.gold   { color: #FFD700; text-shadow: 0 0 10px rgba(255,215,0,0.4); }
.top-rank.silver { color: #C0C0C0; text-shadow: 0 0 10px rgba(192,192,192,0.4); }
.top-rank.bronze { color: #CD7F32; text-shadow: 0 0 10px rgba(205,127,50,0.4); }

.top-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.top-info { flex: 1; min-width: 0; }
.top-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-detail { font-size: 11px; color: var(--t3); display: flex; align-items: center; gap: 8px; }
.top-players { color: var(--orange); font-weight: 600; }
.top-play-btn {
  width: 32px; height: 32px;
  background: rgba(255,107,0,0.1);
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background var(--t-fast), transform var(--t-bounce);
  flex-shrink: 0;
}
.top-list-item:hover .top-play-btn {
  background: var(--orange);
  transform: scale(1.1);
}

/* ── Category Pills ─────────────────────────────────────── */
.category-pills {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 20px 8px;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px; font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.cat-pill:hover {
  background: rgba(255,107,0,0.1);
  border-color: rgba(255,107,0,0.3);
  color: var(--orange-light);
  transform: translateY(-2px);
}
.cat-pill.active {
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 12px var(--orange-glow);
}
.cat-pill-icon { font-size: 14px; }

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
  display: flex; gap: 16px;
  padding: 0 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.stat-card {
  flex: 1; min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: transform var(--t-bounce), border-color var(--t-fast);
  animation: fadeInUp 0.5s ease both;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(255,107,0,0.2); }
.stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px; font-weight: 700;
  background: linear-gradient(135deg, var(--orange-light), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}
.stat-label { font-size: 11px; color: var(--t3); font-weight: 500; }

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
.skeleton-card { width: 160px; flex-shrink: 0; }
.skeleton-thumb { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); }
.skeleton-text { height: 12px; margin-top: 8px; border-radius: 4px; }
.skeleton-text.short { width: 60%; }

/* ── Page Content Views ─────────────────────────────────── */
.page-view {
  display: none;
  animation: fadeIn 0.3s ease;
}
.page-view.active { display: block; }

/* ── Game Detail Page ───────────────────────────────────── */
.game-page-header {
  padding: 24px 20px 0;
  display: flex; align-items: flex-start; gap: 20px;
  flex-wrap: wrap;
}
.game-page-thumb {
  width: 120px; height: 90px;
  border-radius: var(--radius);
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--border);
}
.game-page-info { flex: 1; min-width: 200px; }
.game-page-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--t1);
  margin-bottom: 6px;
}
.game-page-meta {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.game-page-cat {
  background: rgba(255,107,0,0.12);
  color: var(--orange);
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.game-page-stars {
  display: flex; align-items: center; gap: 4px;
  color: var(--gold); font-size: 13px;
}
.game-page-stars span { color: var(--t2); font-size: 12px; }
.game-page-players { font-size: 12px; color: var(--t3); }
.game-page-players strong { color: var(--orange-light); }
.game-page-desc { font-size: 13px; color: var(--t2); line-height: 1.6; max-width: 600px; }

/* Game Action Buttons */
.game-actions {
  display: flex; gap: 10px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.btn-play {
  display: flex; align-items: center; gap: 8px;
  height: 44px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: white;
  font-size: 14px; font-weight: 700;
  padding: 0 28px;
  border-radius: 22px;
  box-shadow: 0 4px 20px var(--orange-glow);
  transition: transform var(--t-bounce), box-shadow var(--t-base);
}
.btn-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(255,107,0,0.5);
}
.btn-play:active { transform: scale(0.97); }

.btn-fullscreen {
  display: flex; align-items: center; gap: 8px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--t2);
  font-size: 13px; font-weight: 600;
  padding: 0 20px;
  border-radius: 22px;
  transition: all var(--t-fast);
}
.btn-fullscreen:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  color: var(--t1);
}

.btn-fav {
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: all var(--t-bounce);
}
.btn-fav:hover { transform: scale(1.15); background: rgba(255,107,0,0.1); border-color: rgba(255,107,0,0.3); }
.btn-fav.active { color: #FF3D5A; border-color: rgba(255,61,90,0.3); }

/* Game Iframe Container */
.game-iframe-wrapper {
  margin: 0 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  position: relative;
}
.game-iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* ── TRUE FULLSCREEN — fills 100% of screen ── */
.game-iframe-wrapper:fullscreen,
.game-iframe-wrapper:-webkit-full-screen,
.game-iframe-wrapper:-moz-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000 !important;
  overflow: hidden !important;
  z-index: 99999 !important;
}
.game-iframe-wrapper:fullscreen .game-iframe,
.game-iframe-wrapper:-webkit-full-screen .game-iframe,
.game-iframe-wrapper:-moz-full-screen .game-iframe,
.game-iframe-wrapper:fullscreen #mainIframe,
.game-iframe-wrapper:-webkit-full-screen #mainIframe,
.game-iframe-wrapper:-moz-full-screen #mainIframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* ── IFRAME-ELEMENT FULLSCREEN (when game triggers fs on iframe directly) ── */
#mainIframe:fullscreen,
#mainIframe:-webkit-full-screen,
#mainIframe:-moz-full-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border: none !important;
  border-radius: 0 !important;
  z-index: 99999 !important;
}

/* ── CSS OVERLAY FULLSCREEN (fallback) ── */
.game-iframe-wrapper.fs-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  z-index: 99999 !important;
}
.game-iframe-wrapper.fs-overlay .game-iframe,
.game-iframe-wrapper.fs-overlay #mainIframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.game-iframe-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg-card);
  gap: 16px;
  z-index: 10;
}
.game-iframe-loading .spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--bg-2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.game-iframe-loading p {
  font-size: 13px; color: var(--t3);
}
.game-iframe-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-2));
  gap: 20px;
  z-index: 10;
  display: none;
}
.game-iframe-fallback .fallback-icon { font-size: 64px; }
.game-iframe-fallback h3 { font-size: 18px; font-weight: 700; color: var(--t1); }
.game-iframe-fallback p { font-size: 13px; color: var(--t3); text-align: center; max-width: 320px; }

/* Game Tags */
.game-tags {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  padding: 0 20px;
  margin-top: 4px;
}
.game-tag {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--t3);
  font-size: 11px; padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.game-tag:hover { background: rgba(255,107,0,0.1); color: var(--orange); border-color: rgba(255,107,0,0.25); }

/* Related Games */
.related-section {
  padding: 24px 20px;
}
.related-section .section-title { font-size: 15px; margin-bottom: 14px; }

/* ── Search Results Page ─────────────────────────────────── */
.search-page-header {
  padding: 24px 20px 16px;
}
.search-page-title {
  font-size: 20px; font-weight: 700;
  margin-bottom: 4px;
}
.search-page-subtitle { font-size: 13px; color: var(--t3); }
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 0 20px;
}

/* ── Category Page ──────────────────────────────────────── */
.category-page-header {
  padding: 24px 20px 16px;
  display: flex; align-items: center; gap: 16px;
}
.category-page-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(255,107,0,0.15), rgba(255,179,0,0.1));
  border: 1px solid rgba(255,107,0,0.2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.category-page-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px; font-weight: 700;
}
.category-page-count { font-size: 13px; color: var(--t3); margin-top: 2px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  padding: 40px 20px 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 12px; color: var(--t3); line-height: 1.6; max-width: 240px; }
.footer-col-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--t2);
  margin-bottom: 12px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-link { font-size: 12px; color: var(--t3); transition: color var(--t-fast); }
.footer-link:hover { color: var(--orange); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 11px; color: var(--t4); }
.footer-flag { font-size: 13px; color: var(--t3); display: flex; align-items: center; gap: 6px; }

/* ── Notification Toast ─────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  animation: slideDown 0.3s ease, fadeIn 0.3s ease;
  max-width: 300px;
  font-size: 13px;
}
.toast.success { border-left: 3px solid var(--badge-new); }
.toast.error { border-left: 3px solid var(--badge-hot); }

/* ── Scroll to Top ──────────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: 24px; left: calc(var(--sidebar-w) + 20px);
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  box-shadow: 0 4px 16px var(--orange-glow);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-bounce);
  z-index: 80;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: scale(1.1) translateY(-2px); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .header { left: 0 !important; }
  .main-content { margin-left: 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-banner { margin: 12px 12px 0; padding: 20px; }
  .hero-title { font-size: 20px; }
  .hero-stats { gap: 14px; }
}
@media (max-width: 600px) {
  .game-card { width: 130px; }
  .game-card-featured { width: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 8px; }
  .stat-value { font-size: 20px; }
  .game-iframe { height: min(80vw, 420px); }
  .game-page-title { font-size: 22px; }
}

/* ── Misc Utilities ─────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: 8px; }
.text-orange { color: var(--orange); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--t3); }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0 !important; }

/* Ripple Effect */
.ripple-btn {
  position: relative; overflow: hidden;
}
.ripple-btn::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  transition: none;
}
.ripple-btn:active::after {
  transform: scale(20);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* India Flag Gradient */
.india-gradient {
  background: linear-gradient(135deg, #FF9933, #FFFFFF, #138808);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Marquee for announcement */
.marquee-wrapper {
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255,107,0,0.08), rgba(255,179,0,0.05));
  border-bottom: 1px solid rgba(255,107,0,0.1);
  padding: 7px 0;
}
.marquee-inner {
  display: flex; gap: 0;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 32px;
  font-size: 12px; color: var(--t3);
}
.marquee-item strong { color: var(--orange); }
.marquee-dot { color: var(--t4); }
