/*
Theme Name: GoGachaGame
Theme URI: https://gogachagame.com
Author: GoGachaGame
Author URI: https://gogachagame.com
Description: High-density gaming, redeem codes, and tech portal theme with active redeem code tickers, spotlight hero guides, and tier list sidebars.
Version: 4.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gogachagame
Tags: gaming, news, dark-mode, custom-menu, featured-images, two-columns, flexbox, grid, translation-ready
*/

/* ===================================================================
   🛡️ ANTI-FOUC GUARD (Kills the Blue-Link & Expanded Menu Flash Instantly)
   =================================================================== */
html.dark, html.dark body {
  background-color: #0B0F17 !important;
  color: #F8FAFC !important;
}

html.light, html.light body {
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
}

/* Stops browser default blue (#0000EE) underlined text */
a {
  color: inherit;
  text-decoration: none;
}

/* Prevents unstyled dropdown menus and overlays from blowing open during initial paint */
.invisible,
[class*="opacity-0"] {
  visibility: hidden;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom Scrollbar Utilities */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

/* ===================================================================
   🖼️ WordPress Core Image & Media Alignment Fixes
   =================================================================== */
.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.aligncenter,
figure.aligncenter,
.wp-block-image.aligncenter,
.wp-block-image.aligncenter figure,
div.wp-block-image.aligncenter {
  display: table !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.aligncenter img,
figure.aligncenter img,
.wp-block-image.aligncenter img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  height: auto;
}

figure.aligncenter figcaption,
.wp-block-image.aligncenter figcaption {
  text-align: center !important;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.alignleft,
figure.alignleft,
.wp-block-image.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright,
figure.alignright,
.wp-block-image.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.clear,
.clearfix {
  clear: both;
}

/* Code Copy Feedback Animation */
@keyframes codePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.code-copied {
  animation: codePulse 0.3s ease-in-out;
}

/* Legal Page & Editorial Typography */
.gogacha-legal-content h1,
.gogacha-legal-content h2,
.gogacha-legal-content h3 {
  color: #0F172A;
  font-weight: 900;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.dark .gogacha-legal-content h1,
.dark .gogacha-legal-content h2,
.dark .gogacha-legal-content h3 {
  color: #F8FAFC;
}

.gogacha-legal-content h2 {
  font-size: 1.25rem;
  border-left: 4px solid #0284C7;
  padding-left: 0.75rem;
}
.dark .gogacha-legal-content h2 {
  border-left-color: #00F0FF;
}

.gogacha-legal-content h3 {
  font-size: 1.1rem;
}

.gogacha-legal-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.gogacha-legal-content a {
  color: #0284C7;
  font-weight: 700;
  text-decoration: underline;
}
.dark .gogacha-legal-content a {
  color: #00F0FF;
}

.gogacha-legal-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.gogacha-legal-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.gogacha-legal-content blockquote {
  border-left: 4px solid #FFB800;
  background-color: rgba(255, 184, 0, 0.08);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
}

/* ===================================================================
   📱 ISOLATED MOBILE VIEWPORT OPTIMIZATIONS (Max Width: 768px)
   =================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
  }

  img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
  }

  .alignleft, .alignright {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    margin-bottom: 1rem !important;
  }

  .entry-content table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }

  .entry-content table td:first-child,
  .entry-content table code,
  .entry-content code {
    white-space: nowrap !important;
    word-break: keep-all !important;
    user-select: all !important;
    -webkit-user-select: all !important;
  }

  .gogacha-copy-btn {
    padding: 3px 8px !important;
    font-size: 10px !important;
    min-height: 24px;
  }

  .entry-content blockquote {
    padding: 0.85rem 1rem !important;
    margin: 1.25rem 0 !important;
    font-size: 0.85rem !important;
  }

  #gogacha-quick-jump-bar,
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}