/* ===================================================================
   GAMESPOLAR - ARCTIC RETRO GAMING PORTAL
   Style Sheet: Modern Glassmorphic Dark Arcade Theme
   =================================================================== */

:root {
  --bg-primary: #070b14;
  --bg-secondary: #0c1322;
  --bg-card: #121b30;
  --bg-card-hover: #182440;
  --bg-glass: rgba(18, 27, 48, 0.75);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);

  --font-heading: 'Orbitron', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

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

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-neon: 0 0 25px rgba(0, 242, 254, 0.25);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1380px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 60%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-sm);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
  -webkit-text-fill-color: #070b14;
  color: #070b14;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #070b14;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 9px 16px 9px 40px;
  color: var(--text-main);
  font-size: 0.88rem;
  width: 220px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  width: 280px;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  background: var(--bg-card-hover);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-mobile-toggle {
  display: none;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-120%);
  transition: transform var(--transition-smooth);
  z-index: 850;
}

.mobile-nav.open {
  transform: translateY(0);
}

.mobile-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--bg-card);
  color: var(--accent-cyan);
}

/* Ad Placement Containers */
.ad-slot-wrapper {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ad-label {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.ad-box {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
  background: rgba(18, 27, 48, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ad-box-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 12px;
}

/* Hero Showcase */
.hero-section {
  padding: 30px 0 20px;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(18, 27, 48, 0.85) 0%, rgba(12, 19, 34, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 30px;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 30%, #b2e8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 580px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #070b14;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 242, 254, 0.6);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--accent-cyan);
}

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-art-card {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 16/10;
  background: #111a2e;
  border-radius: var(--radius-md);
  border: 2px solid rgba(0, 242, 254, 0.35);
  box-shadow: var(--shadow-neon);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

/* Category Filters Bar */
.filter-section {
  padding: 16px 0;
  position: sticky;
  top: 72px;
  z-index: 800;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) transparent;
}

.filter-pills::-webkit-scrollbar {
  height: 4px;
}
.filter-pills::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}

.filter-pill {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-pill.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  font-weight: 600;
}

.pill-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

/* Games Grid */
.games-section {
  padding: 30px 0 60px;
  flex: 1;
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-icon {
  color: var(--accent-cyan);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Load More Pagination Bar */
.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  margin-bottom: 24px;
}

.btn-load-more {
  background: rgba(0, 242, 254, 0.1);
  border: 1.5px solid var(--accent-cyan);
  color: #ffffff;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
  transition: all var(--transition-fast);
  user-select: none;
  touch-action: manipulation;
}

.btn-load-more:hover {
  background: var(--accent-cyan);
  color: #04070e;
  box-shadow: 0 6px 28px rgba(0, 242, 254, 0.55);
  transform: translateY(-2px);
}

.btn-load-more:active {
  transform: translateY(0);
}

.load-more-counter {
  font-size: 0.8rem;
  font-family: var(--font-body);
  opacity: 0.85;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

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

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: 0 16px 30px -10px rgba(0, 242, 254, 0.2), 0 8px 12px -6px rgba(0, 0, 0, 0.4);
}

.game-thumb-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  background: #0f1627;
  overflow: hidden;
}

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

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

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 20, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
}

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

.btn-play-quick {
  background: var(--accent-cyan);
  color: #070b14;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
  transform: scale(0.85);
  transition: transform var(--transition-fast);
}

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

.game-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 5;
}

.game-fav-btn:hover, .game-fav-btn.is-fav {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
}

.game-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.game-genre {
  font-size: 0.75rem;
  color: var(--accent-blue);
  font-weight: 600;
  text-transform: uppercase;
}

.game-rating {
  font-size: 0.8rem;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

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

/* ===================================================================
   FULL-WINDOW RESPONSIVE GAME PLAYER VIEWPORT
   Guarantees 100% visible exit button, zero cut-off, desktop & mobile
   =================================================================== */
.game-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #04070e;
  z-index: 99999;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.game-modal.active {
  display: flex !important;
}

/* Pinned Top Bar: Always at top 0, never scrolls off screen */
.game-player-topbar {
  height: 56px;
  background: #0b1325;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
  gap: 10px;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* High-contrast Exit Button on Top-Left */
.btn-player-back {
  background: rgba(0, 242, 254, 0.15);
  border: 1.5px solid var(--accent-cyan);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.btn-player-back:hover {
  background: var(--accent-cyan);
  color: #04070e;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
  transform: translateY(-1px);
}

.player-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.player-game-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
}

.player-badge {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-tool-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* Big Red Exit Button on Top-Right */
.btn-player-close {
  background: #dc2626;
  border: 1.5px solid #ef4444;
  color: #ffffff;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
  transition: all var(--transition-fast);
}

.btn-player-close:hover {
  background: #b91c1c;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.7);
  transform: translateY(-1px);
}

/* Fullscreen Frame Wrapper */
.game-player-frame-wrap {
  flex: 1;
  width: 100%;
  height: calc(100vh - 56px);
  position: relative;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

/* Floating Panic Exit Button: Always pinned in top-right corner, maximum z-index */
.floating-panic-exit {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 999999;
  background: #dc2626;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.75);
  transition: all var(--transition-fast);
  user-select: none;
  touch-action: manipulation;
}

.floating-panic-exit:hover {
  background: #b91c1c;
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.9);
}

.floating-panic-exit:active {
  transform: scale(0.95);
}

/* Controls & Ad Drawer */
.player-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: rgba(11, 19, 37, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 2px solid var(--accent-cyan);
  padding: 24px;
  z-index: 200;
  transform: translateY(115%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
}

.player-drawer.open {
  transform: translateY(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--accent-cyan);
}

.btn-drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-ad-slot {
  margin-top: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.modal-bottom-details {
  padding: 20px 24px;
  background: var(--bg-secondary);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.game-guide h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-guide p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.controls-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.control-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kbd-key {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.modal-ad-col {
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Static Legal & Content Pages (Privacy, About, Contact, DMCA) */
.page-header {
  padding: 50px 0 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 27, 48, 0.4) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 680px;
  margin: 0 auto;
}

.page-content-wrapper {
  padding: 40px 0 80px;
  max-width: 900px;
  margin: 0 auto;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
}

.legal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent-cyan);
  margin-top: 32px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-card ul {
  padding-left: 24px;
  margin-bottom: 18px;
  color: var(--text-muted);
}

.legal-card li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-card strong {
  color: var(--text-main);
}

.highlight-box {
  background: rgba(0, 242, 254, 0.08);
  border-left: 4px solid var(--accent-cyan);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.highlight-box.warning {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: var(--accent-red);
}

.highlight-box p {
  margin-bottom: 0;
  color: var(--text-main);
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  background: var(--bg-card-hover);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

/* Footer */
.site-footer {
  background: #05080f;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  margin-top: auto;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 14px;
  max-width: 340px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent-cyan);
  padding-left: 4px;
}

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

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 580px;
  margin: 0 auto;
  background: rgba(12, 19, 34, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 1200;
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-content h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.cookie-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cookie-accept {
  background: var(--accent-cyan);
  color: #070b14;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
}

.btn-cookie-decline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

/* ===================================================================
   RESPONSIVE BREAKPOINTS (Mobile, Tablet, Desktop)
   =================================================================== */

@media (max-width: 1080px) {
  .hero-banner {
    grid-template-columns: 1fr;
    padding: 30px;
  }
  .hero-art {
    display: none;
  }
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-links, .search-box {
    display: none;
  }
  .btn-mobile-toggle {
    display: flex;
  }

  .site-header .header-inner {
    height: 60px;
  }

  /* Player Topbar on Tablets/Phones */
  .game-player-topbar {
    height: 52px;
    padding: 0 10px;
  }
  .btn-label-desktop {
    display: none;
  }
  .player-badge {
    display: none;
  }
  .player-game-title {
    font-size: 0.95rem;
    max-width: 130px;
  }
  .btn-player-back {
    padding: 6px 12px;
    font-size: 0.8rem;
    gap: 4px;
  }
  .btn-player-close {
    height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }
  .player-tool-btn {
    height: 34px;
    padding: 0 9px;
  }
  .game-player-frame-wrap {
    height: calc(100vh - 52px);
  }

  /* Portal Content */
  .hero-banner {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }
  .hero-title {
    font-size: 1.6rem;
    line-height: 1.25;
  }
  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }

  /* Hide secondary player buttons on tablets & mobile */
  #modalShareBtn, #modalFavBtn {
    display: none !important;
  }

  .mobile-nav {
    top: 60px;
    z-index: 999;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .game-card {
    border-radius: var(--radius-sm);
  }
  .game-info {
    padding: 12px 10px;
  }
  .game-name {
    font-size: 0.92rem;
  }
  .game-summary {
    display: none; /* Hide multi-line summary on mobile cards for compact clean grid */
  }
  .game-footer-bar {
    padding-top: 8px;
    font-size: 0.72rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-header {
    padding: 30px 0 18px;
  }
  .page-title {
    font-size: 1.7rem;
  }
  .legal-card {
    padding: 22px 16px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 580px) {
  /* Hide non-essential buttons in player topbar */
  #modalRestartBtn, #modalFullscreenBtn, #playerInfoToggleBtn {
    display: none !important;
  }
  .player-actions {
    margin-left: auto;
    flex-shrink: 0;
  }
  .player-title-wrap {
    max-width: calc(100vw - 220px);
    overflow: hidden;
  }
  .player-game-title {
    font-size: 0.85rem;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .btn-player-back {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .btn-player-close {
    flex-shrink: 0;
    padding: 0 10px;
    font-size: 0.78rem;
    min-width: 68px;
    display: inline-flex !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .games-grid {
    grid-template-columns: 1fr; /* Single column on small smartphones */
    gap: 16px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .player-title-wrap {
    display: none !important; /* Hide title on small screens so Back and Close have 100% room */
  }
  .floating-panic-exit {
    top: 8px;
    right: 10px;
    padding: 5px 11px;
    font-size: 0.75rem;
  }
  .player-drawer {
    padding: 16px;
  }
  .cookie-banner {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 16px;
  }
}

