/*
Theme Name: NES Retro 8-Bit
Theme URI: https://score-quest.com
Author: Retro Studio
Author URI: https://score-quest.com
Description: A full 8-bit retro gaming WordPress theme powered by NES.css with 6-track playlist, secret Q-key password dialog supporting ScoreQuest, MALPORTADAv3, GGWP2026 & BitDanceRev, robust HTML5 audio playlist playback, compact blog list view with "START QUEST ->" buttons, auto-translation modal, and equalizer borders.
Version: 4.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nes-retro
*/

body {
  background-color: #212529;
  color: #212529;
  padding-bottom: 50px;
  top: 0px !important;
  transition: background 0.5s ease, color 0.5s ease;
}

.goog-te-banner-frame.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

body > .skiptranslate {
  display: none !important;
}

#google_translate_element {
  display: none !important;
}

.main-wrapper {
  max-width: 1040px;
  margin: 30px auto;
  padding: 0 15px;
  position: relative;
  z-index: 20;
}

.nes-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  background-color: #212529 !important;
  color: #fff !important;
  padding: 16px 20px !important;
}

.hud-brand-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.retro-brand-link {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
  color: #fff !important;
}

.controller-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 38px;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.controller-icon-slot .nes-logo {
  margin: 0 !important;
  top: 0 !important;
  left: 0 !important;
  display: block !important;
  transform: scale(0.9);
  transform-origin: center center;
}

.retro-brand-title {
  font-size: 18px;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 2px 2px #000;
  white-space: nowrap;
}

.retro-brand-link:hover .retro-brand-title {
  color: #f8b800;
}

.hud-controls-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nes-menu-list {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nes-menu-list li {
  margin: 0;
  padding: 0;
}

.nes-menu-list a {
  display: inline-block;
  text-decoration: none;
  font-size: 10px;
  padding: 6px 12px;
  color: #212529;
  background-color: #fff;
  border: 2px solid #000;
  box-shadow: 
    0 -2px 0 0 #fff,
    0 2px 0 0 #000,
    -2px 0 0 0 #fff,
    2px 0 0 0 #000;
  transition: transform 0.1s;
}

.nes-menu-list a:hover {
  background-color: #f8b800;
  color: #000;
  transform: translate(-1px, -1px);
}

.nes-menu-list a:active {
  transform: translate(1px, 1px);
}

.retro-marquee-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #1a1c23;
  border: 2px solid #000;
  padding: 6px 12px;
  margin-bottom: 25px;
  box-shadow: 
    0 -2px 0 0 #fff,
    0 2px 0 0 #000,
    -2px 0 0 0 #fff,
    2px 0 0 0 #000;
  font-size: 9px;
  color: #f8b800;
  overflow: hidden;
}

.retro-marquee-tag {
  flex-shrink: 0;
  background: #000;
  color: #00e436;
  padding: 2px 6px;
  border: 1px solid #333;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.retro-marquee-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.retro-marquee-text {
  display: inline-block;
  white-space: nowrap;
  animation: retro-scroll-text 14s linear infinite;
  color: #f4f4f4;
  letter-spacing: 1px;
}

@keyframes retro-scroll-text {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.center-eq-wrapper {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  margin-bottom: 25px;
  position: relative;
  z-index: 20;
}

.center-eq-canvas {
  width: 28px;
  flex-shrink: 0;
  pointer-events: none;
  background-color: transparent;
}

.center-eq-canvas-left {
  border-right: 2px solid #000;
}

.center-eq-canvas-right {
  border-left: 2px solid #000;
}

.center-card-content {
  flex: 1 1 auto;
  max-width: 960px;
  margin-bottom: 0 !important;
  background-color: #fff;
  padding: 18px 22px !important;
}

.compact-post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.compact-post-title {
  font-size: 12px;
  margin: 0;
  flex: 1;
  min-width: 240px;
}

.compact-post-title a {
  text-decoration: none;
  color: #212529;
}

.compact-post-title a:hover {
  color: #209cee;
  text-decoration: underline;
}

.thumbnail-wrap img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  margin-bottom: 15px;
}

.retro-volume-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #1a1c23;
  padding: 4px 10px;
  border: 2px solid #000;
  box-shadow: 
    0 -2px 0 0 #fff,
    0 2px 0 0 #000,
    -2px 0 0 0 #fff,
    2px 0 0 0 #000;
}

.retro-volume-box label {
  font-size: 8px;
  color: #f8b800;
  margin: 0;
  user-select: none;
}

.nes-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 8px;
  background: #333;
  outline: none;
  border: 2px solid #000;
  margin: 0;
  cursor: pointer;
}

.nes-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 14px;
  background: #209cee;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #000;
  cursor: pointer;
}

.nes-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 14px;
  background: #209cee;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #000;
  cursor: pointer;
  border-radius: 0;
}

#retro-audio-prompt {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  max-width: 320px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

.retro-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.retro-lang-modal {
  max-width: 440px;
  width: 100%;
  background: #212529 !important;
  color: #fff !important;
  text-align: center;
  box-shadow: 
    0 -4px 0 0 #fff,
    0 4px 0 0 #000,
    -4px 0 0 0 #fff,
    4px 0 0 0 #000;
  animation: pop-modal 0.25s ease-out;
}

@keyframes pop-modal {
  0%   { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.retro-lang-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.retro-lang-buttons .nes-btn {
  font-size: 11px;
  padding: 10px 18px;
}

.qmenu-modal {
  max-width: 460px;
  width: 100%;
  background: #212529 !important;
  color: #fff !important;
  text-align: center;
  box-shadow: 
    0 -4px 0 0 #fff,
    0 4px 0 0 #000,
    -4px 0 0 0 #fff,
    4px 0 0 0 #000;
  animation: pop-modal 0.25s ease-out;
}

.qmenu-input {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  background: #1a1c23;
  color: #00ff00;
  border: 2px solid #fff;
  padding: 10px;
  width: 80%;
  margin: 15px 0;
  text-align: center;
  outline: none;
}

/* --- MALPORTADAv3 BLACK AND RED THEME OVERRIDES --- */
body.malportada-active {
  background-color: #0d0d0d !important;
  color: #f4f4f4 !important;
}

body.malportada-active .nes-nav-container,
body.malportada-active .retro-marquee-bar,
body.malportada-active .center-card-content,
body.malportada-active footer.nes-container {
  background-color: #140303 !important;
  color: #ff3333 !important;
  border-color: #e40000 !important;
  box-shadow: 
    0 -3px 0 0 #500,
    0 3px 0 0 #000,
    -3px 0 0 0 #500,
    3px 0 0 0 #000 !important;
}

body.malportada-active .retro-brand-title {
  color: #ff3333 !important;
  text-shadow: 2px 2px #500 !important;
}

body.malportada-active .nes-menu-list a {
  background-color: #1f0505 !important;
  color: #ff6666 !important;
  border-color: #e40000 !important;
  box-shadow: 
    0 -2px 0 0 #ff3333,
    0 2px 0 0 #000,
    -2px 0 0 0 #ff3333,
    2px 0 0 0 #000 !important;
}

body.malportada-active .nes-btn.is-primary {
  background-color: #cc0000 !important;
  color: #fff !important;
  box-shadow: inset -2px -2px 0px 0px #660000, inset 2px 2px 0px 0px #ff6666, 2px 2px 0px 0px #000 !important;
}

body.malportada-active .compact-post-title a {
  color: #ffcccc !important;
}

@media (max-width: 600px) {
  .center-eq-canvas {
    display: none;
  }
}


/* --- MALPORTADAv3: HORIZONTAL SERVER-ART PARADE --- */
#malportada-float-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 29;
  isolation: isolate;
}
.malportada-racer {
  position: absolute;
  left: 0;
  display: block;
  max-width: 38vw;
  max-height: 34vh;
  object-fit: contain;
  opacity: .88;
  filter: drop-shadow(0 0 5px rgba(255, 0, 0, .75));
  animation-name: malportada-race-across;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, scale, filter;
}
@keyframes malportada-race-across {
  from { transform: translate3d(var(--mpv-start), 0, 0); }
  to { transform: translate3d(var(--mpv-end), 0, 0); }
}
@media (max-width: 600px) {
  .malportada-racer { max-width: 34vw; max-height: 24vh; opacity: .76; }
}
@media (prefers-reduced-motion: reduce) {
  .malportada-racer { animation: none !important; left: 4vw; }
}

/* --- BITDANCEREV: RAINBOW TECHNO NEON MODE --- */
body.bitdance-active {
  background: linear-gradient(125deg, #09001f, #16003b, #001d3d, #31002d, #09001f) !important;
  background-size: 400% 400% !important;
  animation: bitdance-bg-flow 16s ease infinite !important;
  color: #fff !important;
}
@keyframes bitdance-bg-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
body.bitdance-active .nes-nav-container,
body.bitdance-active .retro-marquee-bar,
body.bitdance-active .center-card-content,
body.bitdance-active footer.nes-container,
body.bitdance-active .nes-container {
  border-color: #ff38dc !important;
  background-color: rgba(8, 5, 35, .94) !important;
  color: #fff !important;
  box-shadow: 0 0 7px #00f7ff, 0 0 16px #ff38dc, inset 0 0 12px rgba(0,247,255,.18) !important;
}
body.bitdance-active .retro-brand-title,
body.bitdance-active .retro-marquee-text,
body.bitdance-active .retro-marquee-tag,
body.bitdance-active .compact-post-title a {
  color: #fff !important;
  text-shadow: 0 0 5px #00f7ff, 0 0 12px #ff38dc, 0 0 22px #a855f7 !important;
}
body.bitdance-active .nes-menu-list a,
body.bitdance-active .nes-btn {
  border-color: #00f7ff !important;
  color: #fff !important;
  background: linear-gradient(110deg, #5b00a8, #c00091, #005fc9) !important;
  box-shadow: 0 0 6px #00f7ff, 0 0 12px rgba(255,56,220,.8) !important;
}
body.bitdance-active a:hover,
body.bitdance-active button:hover {
  filter: hue-rotate(90deg) brightness(1.25);
}
#bitdance-float-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 30;
  isolation: isolate;
}
.bitdance-floater {
  position: absolute;
  display: block;
  max-width: 30vw;
  max-height: 30vh;
  object-fit: contain;
  opacity: .86;
  filter: drop-shadow(0 0 5px #00f7ff) drop-shadow(0 0 11px #ff38dc);
  animation-name: bitdance-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform, scale, filter;
}
.bd-shape-square { border-radius: 4px; }
.bd-shape-circle { border-radius: 50%; }
.bd-shape-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.bd-shape-soft { border-radius: 28% 8% 28% 8%; }
@keyframes bitdance-float {
  0% { transform: translate3d(0,0,0) rotate(0deg) scale(.82); }
  25% { transform: translate3d(var(--bd-drift-x), calc(var(--bd-drift-y) * -.55), 0) rotate(var(--bd-rotate)) scale(1.08); }
  50% { transform: translate3d(calc(var(--bd-drift-x) * -.45), var(--bd-drift-y), 0) rotate(calc(var(--bd-rotate) * -1)) scale(.94); }
  75% { transform: translate3d(calc(var(--bd-drift-x) * .65), calc(var(--bd-drift-y) * .35), 0) rotate(12deg) scale(1.12); }
  100% { transform: translate3d(0,0,0) rotate(0deg) scale(.82); }
}
@media (max-width: 600px) {
  #bitdance-float-layer { z-index: 30; }
  .bitdance-floater { opacity: .68; max-width: 24vw; max-height: 20vh; }
}
@media (prefers-reduced-motion: reduce) {
  body.bitdance-active { animation: none !important; }
  .bitdance-floater { animation-duration: 45s !important; }
}
