/* ==========================================================================
   zTyping Theater Layout & Game-Switching Deck
   Ultra-modern neon purple & magenta gaming arena matching mockup specifications
   ========================================================================== */

.theater-page {
  padding-top: 0;
  padding-bottom: 40px;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
}

body.page-game .site-container,
body.page-home .site-container,
body.page-typing-trainer .site-container {
  max-width: 1560px;
}

@media (max-width: 768px) {
  .theater-page {
    padding-top: 0;
  }
}

/* ==========================================================================
   Top Breadcrumb / Status Line
   ========================================================================== */
.gp-top-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.gp-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f472b6;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  filter: drop-shadow(0 0 8px rgba(244, 114, 182, 0.45));
}

.gp-status-tag .sparkle {
  color: #f43f5e;
  font-size: 0.95rem;
}

.gp-crumb-sep {
  color: #64748b;
  font-size: 0.95rem;
}

.gp-crumb-current {
  color: #cbd5e1;
  font-weight: 600;
}

/* ==========================================================================
   Game Header Info Banner (Icon + Title + Description + Badges)
   ========================================================================== */
.game-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.game-icon-box {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, #3b195e, #130a24 75%);
  border: 1.5px solid rgba(217, 70, 239, 0.65);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.35), inset 0 0 12px rgba(217, 70, 239, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-icon-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(217, 70, 239, 0.35), transparent 70%);
  pointer-events: none;
}

.game-icon-letter {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(217, 70, 239, 0.8), 0 0 24px rgba(168, 85, 247, 0.6);
  position: relative;
  z-index: 2;
  letter-spacing: -0.05em;
}

.game-info-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
  margin: 0;
}

.game-desc {
  font-size: clamp(0.88rem, 1.4vw, 0.95rem);
  color: #94a3b8;
  max-width: 720px;
  line-height: 1.45;
  margin: 0;
}

.game-meta-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.meta-chip .chip-star {
  color: #fbbf24;
  font-size: 0.85rem;
}

.meta-chip.chip-tag {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.25);
  background: rgba(244, 114, 182, 0.06);
}

/* ==========================================================================
   Split-Screen Side-by-Side Arena Grid (Canvas Left ~80%, Sidebar Right ~20%)
   ========================================================================== */
.game-arena-grid, .theater-grid {
  display: grid;
  grid-template-columns: minmax(0, 78%) minmax(250px, 22%);
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1360px) {
  .game-arena-grid, .theater-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
  }
}

@media (max-width: 1024px) {
  .game-arena-grid, .theater-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
  }
}

@media (max-width: 860px) {
  .game-arena-grid, .theater-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ==========================================================================
   Left Column: Game Stage Frame & Viewport (Web View Arena)
   ========================================================================== */
.game-left-column, .game-stage {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  width: 100%;
}

.game-stage-frame, .viewport-shell {
  background: #090c18;
  border: 1.5px solid rgba(217, 70, 239, 0.45);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(217, 70, 239, 0.18), 0 16px 48px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Top HUD Bar inside frame */
.frame-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(10, 13, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.hud-item .hud-icon {
  font-size: 0.95rem;
  opacity: 0.85;
}

.hud-label {
  color: #94a3b8;
  font-weight: 600;
}

.hud-val {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
}

.hud-practice-btn {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.25) 0%, rgba(147, 51, 234, 0.3) 100%);
  border: 1px solid rgba(217, 70, 239, 0.55);
  color: #f5d0fe;
  padding: 5px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
}

.hud-practice-btn:hover {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.45) 0%, rgba(147, 51, 234, 0.55) 100%);
  border-color: rgba(217, 70, 239, 0.85);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(217, 70, 239, 0.5);
  transform: translateY(-1px);
}

/* Authentic Responsive Canvas Viewport (Wide Web View) */
.viewport, #gameWrap {
  width: 100%;
  aspect-ratio: 16 / 10 !important;
  min-height: 480px;
  max-height: min(80vh, 740px);
  background: #000000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .viewport, #gameWrap {
    aspect-ratio: 4 / 3 !important;
    min-height: 380px;
  }
}

@media (max-width: 480px) {
  .viewport, #gameWrap {
    aspect-ratio: 1 / 1 !important;
    min-height: 300px;
  }
}

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

/* Fullscreen Mode */
body.page-typing-trainer:fullscreen #gameWrap,
body.page-typing-trainer #gameWrap:fullscreen,
body.page-typing-trainer:fullscreen .game-stage-frame,
body.page-typing-trainer .game-stage-frame:fullscreen,
body.page-game:fullscreen #gameWrap,
body.page-game #gameWrap:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

body.page-typing-trainer:fullscreen #gameWrap iframe,
body.page-typing-trainer #gameWrap:fullscreen iframe,
body.page-game:fullscreen #gameWrap iframe,
body.page-game #gameWrap:fullscreen iframe {
  width: 100vw !important;
  height: 100vh !important;
}

/* Loading Placeholder */
#gamePlaceholder {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, #170d2c 0%, #080a14 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  transition: opacity var(--trans-med);
}

.ph-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 16px rgba(217, 70, 239, 0.6);
}

.ph-bar {
  width: 240px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.ph-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, #ec4899, #d946ef, #8b5cf6);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.ph-text {
  font-size: 0.85rem;
  color: #94a3b8;
}

#gameLoadError {
  display: none;
  position: absolute;
  inset: 20px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 24px;
  color: #fca5a5;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 12;
}

/* In-Frame Bottom Controls Toolbar */
.frame-bottom-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: rgba(10, 13, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  gap: 10px;
}

.toolbar-left-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.tool-pill-btn svg {
  opacity: 0.85;
}

.tool-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   Left Column: Details Tabs & Benefits Section (Below Canvas)
   ========================================================================== */
.game-details-tabs-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.details-tab-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2px;
}

.details-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.details-tab-btn svg {
  opacity: 0.75;
}

.details-tab-btn:hover {
  color: #ffffff;
}

.details-tab-btn.active {
  color: #ffffff;
  border-bottom-color: #d946ef;
}

.details-tab-btn.active svg {
  color: #f472b6;
  opacity: 1;
}

.details-tab-card {
  background: rgba(14, 18, 34, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(12px);
}

.about-section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.about-icon-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(217, 70, 239, 0.12);
  border: 1px solid rgba(217, 70, 239, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f472b6;
}

.about-head-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.about-text {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.benefit-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 680px) {
  .benefit-cards-grid {
    grid-template-columns: 1fr;
  }
}

.benefit-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--trans-fast);
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(217, 70, 239, 0.3);
  transform: translateY(-2px);
}

.benefit-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d946ef;
  margin-bottom: 4px;
}

.benefit-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.benefit-sub {
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Content tab panes */
.tab-pane {
  animation: fadeIn 0.25s ease;
}

.guide-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.guide-rules-list li {
  margin-left: 18px;
}

.hotkeys-table {
  width: 100%;
  border-collapse: collapse;
}

.hotkeys-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hotkeys-table tr:last-child {
  border-bottom: none;
}

.hotkeys-table td {
  padding: 10px 6px;
  font-size: 0.86rem;
  color: #cbd5e1;
}

.hotkeys-table td:last-child {
  text-align: right;
}

/* ==========================================================================
   Right Column: Game Discovery & Switcher Deck
   ========================================================================== */
.game-sidebar-deck {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Switch Game Top Card */
.sidebar-card.switch-game-card {
  background: rgba(14, 18, 34, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.switch-game-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d946ef;
}

.switch-head-text {
  display: flex;
  flex-direction: column;
}

.switch-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.switch-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
}

/* Sidebar Search Bar */
.sidebar-search-wrap {
  position: relative;
  width: 100%;
}

.search-lens {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.6;
  pointer-events: none;
}

.sidebar-search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.84rem;
  outline: none;
  transition: all var(--trans-fast);
}

.sidebar-search-input:focus {
  border-color: #d946ef;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
}

.sidebar-search-input::placeholder {
  color: #64748b;
}

/* Category Filter Pills */
.category-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-pill {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.cat-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.cat-pill.active {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.35);
}

/* Sidebar Section Headers */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

.section-label-row .sec-icon {
  color: #f472b6;
  font-size: 0.88rem;
}

.section-label-row .sec-arrow {
  margin-left: auto;
  color: #64748b;
  font-size: 1rem;
}

/* Now Playing Card */
.now-playing-card {
  background: rgba(26, 18, 48, 0.7);
  border: 1.5px solid rgba(217, 70, 239, 0.55);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.16);
}

.np-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #4c1d95, #1e0d38 75%);
  border: 1px solid rgba(217, 70, 239, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.np-letter {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(217, 70, 239, 0.7);
}

.np-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.np-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.np-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}

.np-tag {
  color: #f472b6;
  font-weight: 600;
}

.np-rating {
  color: #fbbf24;
  font-weight: 600;
}

.np-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-playing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.35);
}

.np-playing-badge .arr {
  font-size: 0.85rem;
}

/* Other Games List */
.other-games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.other-game-item {
  background: rgba(14, 18, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  transition: all var(--trans-fast);
}

.other-game-item:hover {
  background: rgba(22, 28, 52, 0.85);
  border-color: rgba(217, 70, 239, 0.3);
  transform: translateY(-1px);
}

.og-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.og-icon-box.speed-bg {
  background: linear-gradient(135deg, #4c0519, #881337);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.og-icon-box.custom-bg {
  background: linear-gradient(135deg, #172554, #1e3a8a);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.og-icon-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #60a5fa;
}

.og-icon-box.swords-bg {
  background: linear-gradient(135deg, #3b0764, #581c87);
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.og-icon-box.trophy-bg {
  background: linear-gradient(135deg, #451a03, #78350f);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.og-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.og-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.og-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
}

.og-tag {
  color: #f472b6;
  font-weight: 600;
}

.og-rating {
  color: #fbbf24;
  font-weight: 600;
}

.og-desc {
  font-size: 0.73rem;
  color: #94a3b8;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.og-play-btn {
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--trans-fast);
}

.og-play-btn:hover {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.35);
}

/* More Games Card Grid */
.more-games-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 4px 0;
  cursor: pointer;
  text-decoration: none;
}

.sec-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-pixel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.6));
}

.sec-arrow-link {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color var(--trans-fast), transform var(--trans-fast);
}

.more-games-head:hover .sec-arrow-link,
.sec-arrow-link:hover {
  color: #f472b6;
  transform: translateX(2px);
}

.more-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 640px) {
  .more-games-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.more-game-card {
  background: #0d1226;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.more-game-card:hover {
  border-color: rgba(217, 70, 239, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(217, 70, 239, 0.25);
}

/* Currently Playing Active Game Card */
.more-game-card.is-current {
  background: #110e28;
  border: 1.5px solid rgba(217, 70, 239, 0.7);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.25), 0 8px 24px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.more-game-card.is-current:hover {
  transform: none;
}

.mg-active-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(16, 185, 129, 0.92);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(16, 185, 129, 0.5);
  z-index: 2;
}

.mg-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
  animation: liveDotPulse 1.5s infinite ease-in-out;
}

@keyframes liveDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.mg-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #060812;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

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

.mg-thumb.custom-arcade-bg {
  background: radial-gradient(circle at 50% 50%, #241142 0%, #0a0614 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mg-thumb.custom-drill-bg {
  background: radial-gradient(circle at 50% 50%, #1e3a8a 0%, #0c152e 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.mg-thumb.custom-catalog-bg {
  background: radial-gradient(circle at 50% 50%, #4c1d95 0%, #130a24 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.custom-card-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(147, 197, 253, 0.5));
  transition: transform 0.25s ease;
}

.more-game-card:hover .custom-card-art {
  transform: scale(1.12);
}

.pixel-invader {
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
  transition: transform 0.25s ease;
}

.more-game-card:hover .pixel-invader {
  transform: scale(1.15);
  filter: drop-shadow(0 0 14px rgba(217, 70, 239, 0.85));
}

.mg-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 28, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scale(0.92);
}

.more-game-card:hover .mg-play-overlay {
  opacity: 1;
  transform: scale(1);
}

.mg-play-pill {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(217, 70, 239, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

.mg-info {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #0d1226;
}

.mg-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  transition: color var(--trans-fast);
}

.mg-genre {
  font-size: 0.78rem;
  color: #60a5fa;
  font-weight: 500;
}

.more-game-card:hover .mg-title {
  color: #f472b6;
}

/* Empty filter state */
.no-games-box {
  grid-column: 1 / -1;
  background: rgba(14, 18, 34, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.no-games-box p {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.no-games-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #ec4899, #d946ef);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 70, 239, 0.35);
  transition: transform var(--trans-fast);
}

.no-games-reset-btn:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   Popup Modals (Help, Hotkeys, Quick Game Preview)
   ========================================================================== */
.theater-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.theater-modal-backdrop.is-open {
  display: flex;
}

.theater-modal-box {
  background: #0e1224;
  border: 1.5px solid rgba(217, 70, 239, 0.45);
  border-radius: 22px;
  padding: 26px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 0 36px rgba(217, 70, 239, 0.25), 0 24px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: modalPop 0.2s ease-out;
}

.preview-modal-box {
  text-align: center;
  align-items: center;
  max-width: 480px;
  padding: 24px;
}

.preview-modal-thumb {
  width: 100%;
  max-height: 210px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #060812;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.preview-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-modal-svg {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #2d104d 0%, #0a0614 100%);
  width: 100%;
  height: 100%;
}

.preview-thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.preview-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.genre-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-pill);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 600;
}

.preview-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.modal-play-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
  letter-spacing: 0.02em;
}

.modal-play-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.modal-explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all var(--trans-fast);
}

.modal-explore-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: all var(--trans-fast);
  z-index: 5;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

