/* =========================================================
   GAMEFLUX - UNBLOCKED GAMES STYLESHEET
   Aesthetics: Dark Glassmorphism, Neon Accents & Micro-animations
========================================================= */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: rgba(22, 22, 36, 0.75);
  --bg-card-hover: rgba(30, 30, 50, 0.95);

  --accent-primary: #6c5ce7;
  --accent-secondary: #fd79a8;
  --accent-cyan: #00cec9;
  --accent-green: #00b894;
  --accent-gold: #fdcb6e;

  --gradient-accent: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 100%);
  --gradient-hot: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
  --gradient-new: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  --gradient-dark: linear-gradient(180deg, rgba(10, 10, 18, 0.4) 0%, rgba(10, 10, 18, 0.95) 100%);

  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;
  --text-muted: #6c6c8c;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(108, 92, 231, 0.6);
  --glow-primary: 0 0 25px rgba(108, 92, 231, 0.35);
  --glow-card: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(108, 92, 231, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(253, 121, 168, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(0, 206, 201, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

/* =========================================================
   STICKY NAVBAR
========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 18, 0.82);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px rgba(108, 92, 231, 0.6));
}

.logo-text span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search Bar */
.search-container {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  height: 44px;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.25);
}

.search-icon {
  font-size: 1rem;
  opacity: 0.6;
  margin-right: 10px;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.clear-search-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  display: none;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.panic-btn {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: #ff6b81;
}

.panic-btn:hover {
  background: #ff4757;
  color: white;
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.5);
  transform: translateY(-1px);
}

.random-btn {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.35);
  color: #a29bfe;
}

.random-btn:hover {
  background: var(--accent-primary);
  color: white;
  box-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text-primary);
  padding: 6px;
}

/* =========================================================
   HERO SECTION
========================================================= */
.hero-section {
  padding: 32px 0 20px;
}

.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(30, 24, 60, 0.85) 0%, rgba(18, 18, 30, 0.95) 100%);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--glow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 680px;
  z-index: 1;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(0, 184, 148, 0.15);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-accent);
  color: white;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(108, 92, 231, 0.6);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

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

.hero-quick-stats {
  display: flex;
  gap: 20px;
  z-index: 1;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
  min-width: 120px;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

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

/* =========================================================
   CATEGORY FILTER BAR
========================================================= */
.categories-wrapper {
  padding: 12px 0 20px;
  position: relative;
}

.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(108, 92, 231, 0.4) transparent;
}

.categories-scroll::-webkit-scrollbar {
  height: 6px;
}

.categories-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.cat-pill.active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 18px rgba(108, 92, 231, 0.45);
}

/* =========================================================
   SECTION HEADERS
========================================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.game-count-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

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

/* =========================================================
   GAME GRID (RESPONSIVE FULL-WIDTH)
========================================================= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 1400px) {
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Game Card */
.game-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), var(--glow-primary);
  background: var(--bg-card-hover);
}

.card-thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #19192b;
  overflow: hidden;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

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

/* Play Overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.game-card:hover .card-overlay {
  opacity: 1;
}

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.8);
  transform: scale(0.8);
  transition: transform var(--transition-fast);
}

.game-card:hover .play-circle {
  transform: scale(1);
}

/* Card Badges */
.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.badge-hot {
  background: var(--gradient-hot);
  color: white;
}

.badge-new {
  background: var(--gradient-new);
  color: white;
}

/* Card Content Info */
.card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-plays {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-rating {
  color: var(--accent-gold);
  font-weight: 600;
}

/* Empty Results */
.empty-results {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-sub {
  color: var(--text-muted);
}

/* =========================================================
   FULLSCREEN IN-PAGE GAME MODAL
========================================================= */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.98);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.game-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  height: 64px;
  background: rgba(18, 18, 30, 0.95);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.modal-game-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.modal-back-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.modal-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-ctrl-btn.active-fav {
  color: #ff4757;
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.15);
}

/* Modal Body / Iframe */
.modal-body {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  flex-direction: column;
}

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

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

.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d0d16;
  gap: 16px;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(108, 92, 231, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* =========================================================
   PANIC OVERLAY (DISGUISE SCREEN)
========================================================= */
.panic-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #202124;
  font-family: Arial, sans-serif;
}

.panic-screen.active {
  display: flex;
}

.fake-google-logo {
  font-size: 4rem;
  font-weight: bold;
  letter-spacing: -2px;
  margin-bottom: 24px;
  user-select: none;
}

.fake-google-logo span:nth-child(1) {
  color: #4285F4;
}

.fake-google-logo span:nth-child(2) {
  color: #EA4335;
}

.fake-google-logo span:nth-child(3) {
  color: #FBBC05;
}

.fake-google-logo span:nth-child(4) {
  color: #4285F4;
}

.fake-google-logo span:nth-child(5) {
  color: #34A853;
}

.fake-google-logo span:nth-child(6) {
  color: #EA4335;
}

.fake-search-box {
  width: 90%;
  max-width: 580px;
  height: 46px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.15);
  font-size: 1rem;
}

.fake-search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 1rem;
}

.panic-restore-tip {
  margin-top: 24px;
  font-size: 0.85rem;
  color: #70757a;
}

.restore-btn {
  color: #1a73e8;
  text-decoration: underline;
  cursor: pointer;
}

/* =========================================================
   FAQ SECTION (SEO RICH SNIPPETS)
========================================================= */
.faq-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-card-hover);
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.faq-answer {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 28px;
  margin-top: 40px;
}

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

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

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

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 0.95rem;
  max-width: 360px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
========================================================= */
@media (max-width: 900px) {
  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-btn span {
    display: none;
  }

  .nav-btn {
    padding: 8px 12px;
  }

  .hero-quick-stats {
    width: 100%;
    justify-content: space-between;
  }

  .stat-card {
    flex: 1;
    min-width: 0;
    padding: 12px 10px;
  }

  .stat-num {
    font-size: 1.4rem;
  }
}

/* =========================================================
   DEDICATED GAME PLAYER PAGES (MULTIPLE PAGES SETUP)
========================================================= */
.play-wrapper {
  margin-top: 30px;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.game-player-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.player-header {
  height: 60px;
  background: rgba(18, 18, 30, 0.95);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.player-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-back-home:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.player-game-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.player-viewport-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

@media (max-width: 768px) {
  .player-viewport-wrapper {
    aspect-ratio: 4 / 3;
  }
}

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

.player-control-bar {
  height: 54px;
  background: rgba(18, 18, 30, 0.95);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.player-stats-left {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.player-rating-stars {
  color: var(--accent-gold);
  font-weight: 600;
}

.player-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.player-btn.active-fav {
  color: #ff4757;
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.12);
}

/* SEO Content Sections */
.game-seo-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.seo-rich-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.seo-rich-layout h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.seo-rich-layout h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.seo-rich-layout p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.seo-rich-layout ul,
.seo-rich-layout ol {
  margin-left: 20px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-rich-layout li {
  line-height: 1.6;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.85rem;
  font-family: monospace;
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.control-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* FAQ Accordion Styling (Semantic details/summary elements) */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast) ease-in-out;
}

.faq-details[open] {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-summary {
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  /* Hide default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
  /* Hide Safari arrow */
}

.faq-summary::after {
  content: '＋';
  font-size: 1.1rem;
  color: var(--accent-gold);
  transition: transform var(--transition-fast) ease;
}

.faq-details[open] .faq-summary::after {
  content: '－';
  color: var(--text-primary);
}

.faq-details .faq-answer {
  padding: 0 20px 20px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}

/* External Play Launcher Panel (Poki games fallback) */
.external-play-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  background: radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, #08080f 100%);
  padding: 40px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.external-icon {
  font-size: 3.8rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.external-play-wrapper h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.external-play-wrapper p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 28px;
  line-height: 1.6;
}

.play-external-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--gradient-accent);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--glow-primary);
  transition: all var(--transition-fast) ease;
}

.play-external-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(108, 92, 231, 0.6);
  color: #fff;
}

/* =========================================================
   VERTICAL CATEGORY SIDEBAR LAYOUT
========================================================= */
.main-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-top: 30px;
  margin-bottom: 40px;
}

.sidebar-wrapper {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sidebar-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Custom categories styling on sidebar */
.sidebar-scroll .cat-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sidebar-scroll .cat-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar-scroll .cat-pill.active {
  background: var(--gradient-accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* Main Content Area on Grid */
.main-content {
  flex: 1;
  min-width: 0;
  /* Prevents flex items from overflowing container */
  margin: 0 !important;
  padding: 0 !important;
}

/* Responsive category list for small screen sizes */
@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
  }

  .sidebar-wrapper {
    width: 100%;
    position: static;
    max-height: none;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .sidebar-scroll {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  /* Hide scrollbars but keep functionality */
  .sidebar-scroll::-webkit-scrollbar {
    height: 4px;
  }

  .sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-pill);
  }

  .sidebar-scroll .cat-pill {
    width: auto;
    padding: 8px 16px;
    font-size: 0.88rem;
    flex-shrink: 0;
  }

  .sidebar-scroll .cat-pill:hover {
    transform: none;
  }
}

/* =========================================================
   PAGINATION CONTROLS
========================================================= */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 40px auto 20px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  max-width: fit-content;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

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

.pagination-btn.active {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 0 4px;
  letter-spacing: 2px;
  font-weight: 700;
}