/*
Theme Name: GameCentral Blog
Theme URI: https://gamecentral.blog
Author: GameCentral Team
Author URI: https://gamecentral.blog
Description: A high-performance, 100% custom WordPress theme built for gamecentral.blog featuring a retro Pixel Zine editorial layout, native HTML5 games, AEO quick answer blocks, GEO AI content optimization, and zero plugin dependencies.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: gamecentral
*/

/* ==========================================================================
   1. DESIGN TOKENS & CSS VARIABLES
   ========================================================================== */
:root {
  /* Color Palette - Pixel Zine Aesthetic */
  --bg-color: #FAF7F0;        /* Warm Cream */
  --bg-card: #FFFFFF;         /* White Card Base */
  --bg-alt: #F2ECE1;          /* Subtle Warm Tint */
  --text-main: #161616;       /* Ink Black */
  --text-muted: #555555;      /* Muted Ink */
  --text-light: #777777;
  
  --primary: #2D5CFF;         /* Electric Blue */
  --primary-hover: #1E46D4;
  --secondary: #FF3D6E;       /* Hot Pink Accent */
  --secondary-hover: #E02B57;
  --accent-yellow: #FFD166;   /* Retro Arcade Gold */
  --accent-green: #06D6A0;    /* Arcade Green */

  /* Pixel Border System */
  --border-width: 2px;
  --border-color: #161616;
  --border-solid: 2px solid #161616;
  --shadow-hard: 4px 4px 0px #161616;
  --shadow-hard-lg: 6px 6px 0px #161616;
  --shadow-hard-hover: 6px 6px 0px #161616;

  /* Typography */
  --font-heading: 'Pixelify Sans', 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  /* Spacing */
  --container-max: 1200px;
  --container-narrow: 840px;
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2.5rem;
  --gap-xl: 4rem;

  /* Layout Radius (0 for Hard Edge Zine Feel) */
  --radius-none: 0px;
  --radius-sm: 4px;
}

/* Dark Mode Tokens (Optional / Accent Contexts) */
[data-theme="dark"] {
  --bg-color: #12131A;
  --bg-card: #1C1E2A;
  --bg-alt: #252838;
  --text-main: #FAF7F0;
  --text-muted: #A0A5BD;
  --border-color: #FAF7F0;
  --border-solid: 2px solid #FAF7F0;
  --shadow-hard: 4px 4px 0px #2D5CFF;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

img, video, iframe, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--secondary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.65rem; border-bottom: var(--border-solid); padding-bottom: 0.5rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.25rem;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

blockquote {
  border-left: 4px solid var(--secondary);
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  font-style: italic;
  margin: 1.5rem 0;
}

hr {
  border: none;
  border-top: var(--border-solid);
  margin: 2.5rem 0;
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */
.site-container {
  width: 92%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-container-narrow {
  width: 92%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1rem;
}

.main-content {
  flex: 1 0 auto;
  padding: 2.5rem 0 4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--gap-lg);
}

@media (max-width: 992px) {
  .grid-sidebar { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
}

/* ==========================================================================
   4. UI COMPONENTS (ZINE CARDS, BUTTONS, BADGES)
   ========================================================================== */
/* Zine Box / Card */
.zine-card {
  background: var(--bg-card);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.zine-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-hover);
}

.zine-card-accent {
  background: var(--bg-alt);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  background-color: var(--primary);
  color: #FFFFFF !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  user-select: none;
}

.btn:hover {
  background-color: var(--secondary);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-hover);
  color: #FFFFFF !important;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #FFFFFF !important;
}

.btn-secondary:hover {
  background-color: var(--primary);
}

.btn-outline {
  background-color: var(--bg-card);
  color: var(--text-main) !important;
}

.btn-outline:hover {
  background-color: var(--text-main);
  color: var(--bg-color) !important;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Pixel Badges & Tags */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: var(--border-solid);
  background: var(--accent-yellow);
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.badge-blue { background: var(--primary); color: #FFFFFF; }
.badge-pink { background: var(--secondary); color: #FFFFFF; }
.badge-green { background: var(--accent-green); color: var(--text-main); }

/* Pixel Icon accent */
.pixel-icon {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background-color: var(--bg-card);
  border-bottom: var(--border-solid);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-topbar {
  background: var(--text-main);
  color: var(--bg-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-topbar a {
  color: var(--accent-yellow);
  text-decoration: underline;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  background: var(--secondary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  padding: 0.4rem 0.8rem;
  border: var(--border-solid);
  box-shadow: 3px 3px 0px var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-badge span {
  color: var(--accent-yellow);
}

.site-title-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-main);
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.nav-links a:hover,
.nav-links .current-menu-item a {
  background: var(--primary);
  color: #FFFFFF;
  border: var(--border-solid);
  box-shadow: 2px 2px 0px var(--text-main);
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-card);
  border: var(--border-solid);
  box-shadow: 2px 2px 0px var(--text-main);
  padding: 0.4rem 0.7rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .mobile-menu-toggle { display: block; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: var(--border-solid);
    padding: 1.25rem 1rem;
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
    z-index: 999;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .nav-links a { display: block; width: 100%; padding: 0.5rem 0.75rem; }
}

@media (max-width: 520px) {
  .header-topbar {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-tagline {
    font-size: 0.62rem;
  }
  .logo-badge {
    font-size: 1.05rem;
    padding: 0.3rem 0.6rem;
  }
  .nav-right-actions {
    gap: 0.4rem;
  }
}

/* ==========================================================================
   6. BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--text-main);
  text-decoration: underline;
}

.breadcrumbs span.separator {
  margin: 0 0.4rem;
  color: var(--secondary);
}

/* ==========================================================================
   7. AEO QUICK ANSWER BOX & GEO DEFINITION BLOCKS
   ========================================================================== */
.aeo-answer-box {
  background: #FFFDF7;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.aeo-answer-box::before {
  content: "⚡ QUICK ANSWER / SUMMARY";
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  background: var(--primary);
  color: #FFFFFF;
  padding: 0.2rem 0.6rem;
  width: fit-content;
  margin-bottom: 0.75rem;
  border: 1px solid #161616;
}

.aeo-answer-box p {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 1.6;
}

.geo-definition {
  background: var(--bg-alt);
  border-left: 4px solid var(--secondary);
  border: var(--border-solid);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.geo-definition-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   8. ARCADE CABINET MODULE (GAMES PLAY PAGE)
   ========================================================================== */
.arcade-cabinet-wrapper {
  background: #0D0F18;
  border: 3px solid #161616;
  box-shadow: 8px 8px 0px #161616;
  padding: 1.5rem;
  color: #00FFCC;
  font-family: var(--font-mono);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2D5CFF;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.cabinet-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #FF3D6E;
  text-shadow: 0 0 8px rgba(255,61,110,0.6);
  margin-bottom: 0;
}

.cabinet-controls-bar {
  display: flex;
  gap: 0.75rem;
}

.cabinet-btn {
  background: #1C1E2A;
  border: 1px solid #00FFCC;
  color: #00FFCC;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.cabinet-btn:hover {
  background: #00FFCC;
  color: #0D0F18;
}

.canvas-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  background: #000000;
  border: 2px solid #2D5CFF;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

canvas.game-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

/* CRT Overlay Effect */
.crt-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 10;
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
}

.cabinet-score-panel {
  display: flex;
  justify-content: space-around;
  background: #151824;
  border: 1px solid #2D5CFF;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.score-item span.val {
  color: #FFD166;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Touch Control Pad for Mobile */
.touch-control-pad {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .touch-control-pad { display: grid; }
}

@media (max-width: 600px) {
  .arcade-cabinet-wrapper {
    padding: 1rem 0.75rem;
    box-shadow: 4px 4px 0px #161616;
  }
  .cabinet-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .cabinet-controls-bar {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .cabinet-btn {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.3rem;
  }
  .cabinet-score-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
  }
}

.touch-btn {
  background: #2D5CFF;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  padding: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-align: center;
  user-select: none;
  cursor: pointer;
}

.touch-btn:active {
  background: #FF3D6E;
}

/* ==========================================================================
   9. TABLE OF CONTENTS (VANILLA JS)
   ========================================================================== */
.toc-container {
  background: var(--bg-alt);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  padding: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc-list li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.toc-list li.toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.88rem;
}

.toc-list a {
  color: var(--text-main);
  font-weight: 500;
}

.toc-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==========================================================================
   10. FAQ ACCORDION
   ========================================================================== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.faq-item {
  background: var(--bg-card);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
}

.faq-question .icon {
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.faq-item.is-active .faq-question .icon {
  transform: rotate(45deg);
  color: var(--secondary);
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.98rem;
  color: var(--text-main);
}

.faq-item.is-active .faq-answer {
  display: block;
  padding-top: 1rem;
}

/* ==========================================================================
   11. SIDEBAR & WIDGETS
   ========================================================================== */
.widget {
  background: var(--bg-card);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  border-bottom: var(--border-solid);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.recent-posts-list {
  list-style: none;
  padding-left: 0;
}

.recent-post-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg-alt);
}

.recent-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-post-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.recent-post-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--text-main);
  color: var(--bg-color);
  border-top: 4px solid var(--primary);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: 2.5rem;
}

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

.footer-brand h3 {
  color: var(--accent-yellow);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #CCCCCC;
  font-size: 0.9rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 0.95rem;
  border-bottom: 1px solid #333333;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #CCCCCC;
  font-size: 0.88rem;
  font-weight: 400;
}

.footer-links a:hover {
  color: var(--accent-yellow);
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #888888;
}

@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ==========================================================================
   13. COMMENTS SECTION
   ========================================================================== */
.comments-area {
  margin-top: 3rem;
  border-top: var(--border-solid);
  padding-top: 2rem;
}

.comment-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 2rem;
}

.comment-body {
  background: var(--bg-card);
  border: var(--border-solid);
  box-shadow: var(--shadow-hard);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-author {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 0.85rem;
}

.comment-form-group {
  margin-bottom: 1rem;
}

.comment-form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.input-control {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: var(--border-solid);
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-hard);
}

textarea.input-control {
  resize: vertical;
  min-height: 110px;
}
