/*
Theme Name: Hardcore Pixels
Theme URI: https://github.com/your-band
Description: Digital hardcore with animated pixel-field eye background.
Version: 1.0
Author: Your Band
*/

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --black:   #0a0a0a;
  --dark:    #111111;
  --panel:   #1a1a1a;
  --border:  #2a2a2a;
  --green:   #00ff41;
  --magenta: #ff00ff;
  --cyan:    #00ffff;
  --red:     #ff003c;
  --yellow:  #ffff00;
  --white:   #e0e0e0;
  --dim:     #555555;
  --pixel: 'Press Start 2P', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: transparent; /* pixel-field canvas sits behind at z-index:-1 */
  color: var(--white);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 2;
  image-rendering: pixelated;
  overflow-x: hidden;
}

/* ── CRT scanlines overlay ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Screen flicker ─────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,255,65,0.015);
  pointer-events: none;
  z-index: 9998;
  animation: flicker 8s infinite;
}

@keyframes flicker {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,24%,55% { opacity: 0.4; }
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pixel);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.6;
}

h1 { font-size: 2.2rem; color: var(--green); }
h2 { font-size: 1.4rem; color: var(--magenta); }
h3 { font-size: 1.1rem; color: var(--cyan); }
h4 { font-size: 0.9rem; color: var(--yellow); }

p { margin-bottom: 1.4em; font-size: 0.85rem; color: var(--white); }

a { color: var(--green); text-decoration: none; transition: color 0.1s, text-shadow 0.1s; }
a:hover { color: var(--magenta); text-shadow: 0 0 8px var(--magenta); }

/* ── Layout ─────────────────────────────────────────────────────── */
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 2px solid var(--green);
  padding: 2rem 0 1.5rem;
  position: relative;
  background: var(--black);
}

.site-header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--magenta), var(--cyan), var(--green));
  background-size: 300% 100%;
  animation: gradient-shift 4s linear infinite;
  margin-top: 0.5rem;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.site-branding { margin-bottom: 1.5rem; text-align: center; }

.site-title {
  font-size: clamp(1.4rem, 5vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 1.2;
  display: inline-block;
  color: var(--green);
  text-shadow: 0 0 3px var(--green);
  animation: glitch-title 6s infinite;
  position: relative;
}

.site-title a { color: inherit; }

@keyframes glitch-title {
  0%,90%,100% { transform: translate(0); text-shadow: 0 0 3px var(--green); }
  91%          { transform: translate(-3px, 1px); text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan); }
  93%          { transform: translate(3px, -1px); text-shadow: 2px 0 var(--red), -2px 0 var(--green); }
  95%          { transform: translate(-2px, 2px); text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta); }
  97%          { transform: translate(0); }
}

.site-description {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 0.5rem;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.main-nav a {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.5rem calc(0.75rem + 1em) 0.5rem 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.1s;
  position: relative;
}

.main-nav a::before {
  content: '>';
  display: inline-block;
  width: 1em;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.1s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  color: var(--green);
  border-color: var(--green);
  text-shadow: 0 0 6px var(--green);
  background: rgba(0,255,65,0.05);
}

.main-nav a:hover::before,
.main-nav .current-menu-item a::before { opacity: 1; }

/* ── Main content ───────────────────────────────────────────────── */
.site-main {
  padding: 3rem 0;
  min-height: 70vh;
}

/* ── Pixel panel / card ─────────────────────────────────────────── */
.pixel-panel {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 2rem;
  position: relative;
  margin-bottom: 2rem;
}

.pixel-panel::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--green), transparent 40%, transparent 60%, var(--magenta));
  z-index: -1;
  opacity: 0.4;
}

/* ── Posts ──────────────────────────────────────────────────────── */
.post-entry {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  transition: border-color 0.15s;
}

.post-entry:hover { border-color: var(--green); }

.post-entry::before {
  content: attr(data-index);
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.5rem;
  color: var(--border);
  font-family: var(--pixel);
}

.entry-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.entry-title a { color: var(--cyan); }
.entry-title a:hover { color: var(--magenta); }

.entry-meta {
  font-size: 0.55rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  border-left: 2px solid var(--green);
  padding-left: 0.75rem;
}

.entry-excerpt { font-size: 0.75rem; color: #aaaaaa; }

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.6rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 1px solid var(--green);
  padding: 0.4rem 0.8rem;
  transition: all 0.1s;
}

.read-more:hover {
  background: var(--green);
  color: var(--black);
  text-shadow: none;
  box-shadow: 0 0 4px var(--green);
}

/* ── Single post ────────────────────────────────────────────────── */
.single-post-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.entry-content {
  font-size: 0.8rem;
  line-height: 2.2;
  color: #cccccc;
}

.entry-content h2 { margin: 2rem 0 0.75rem; }
.entry-content h3 { margin: 1.5rem 0 0.5rem; }
.entry-content p  { margin-bottom: 1.2em; }

.entry-content img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  border: 2px solid var(--border);
  display: block;
  margin: 1.5rem auto;
}

.entry-content ul,
.entry-content ol {
  margin: 1em 0 1em 2em;
  font-size: 0.75rem;
}

.entry-content li { margin-bottom: 0.5em; }

.entry-content blockquote {
  border-left: 4px solid var(--magenta);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(255,0,255,0.05);
  color: var(--magenta);
  font-style: normal;
}

.entry-content code {
  font-family: var(--pixel);
  font-size: 0.7rem;
  background: var(--dark);
  color: var(--cyan);
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
}

.entry-content pre {
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.widget {
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.7rem;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.widget ul { list-style: none; }
.widget li { padding: 0.3rem 0; border-bottom: 1px solid var(--border); font-size: 0.65rem; }
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--dim); }
.widget a:hover { color: var(--green); }

/* ── Two-col layout for index ───────────────────────────────────── */
.content-area {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

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

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  font-family: var(--pixel);
  font-size: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--dim);
  text-decoration: none;
  transition: all 0.1s;
}

.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current { border-color: var(--magenta); color: var(--magenta); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.55rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
}

.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  margin-bottom: 1.5rem;
}

.footer-credits { margin-top: 0.5rem; }
.footer-credits a { color: var(--dim); }
.footer-credits a:hover { color: var(--red); }

/* ── Utility: neon text helpers ─────────────────────────────────── */
.text-green   { color: var(--green);   text-shadow: 0 0 8px var(--green); }
.text-magenta { color: var(--magenta); text-shadow: 0 0 8px var(--magenta); }
.text-cyan    { color: var(--cyan);    text-shadow: 0 0 8px var(--cyan); }
.text-red     { color: var(--red);     text-shadow: 0 0 8px var(--red); }

/* ── Pixel scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--green); }
::-webkit-scrollbar-thumb:hover { background: var(--magenta); }

/* ── Pixel Controls Panel ───────────────────────────────────────── */
.px-controls {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10000;
  font-family: var(--pixel);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* Toggle button — bare eye canvas, no box or glow */
.px-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

#px-eye { display: block; pointer-events: none; }

/* Panel — very dark teal bg ties into the cyan→magenta border gradient */
.px-panel {
  background: #060e0f;
  border: 1px solid #0d2a2e;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan), var(--magenta)) 1;
  box-shadow: 0 0 16px rgba(0,0,0,0.85), 0 0 6px rgba(0,255,255,0.1);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
/* Override UA [hidden]{display:none} which author display:flex would otherwise beat */
.px-panel[hidden] { display: none; }

.px-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── BG row: cyan accent ──────────────────────────────────────── */
.px-row--bg .px-label { color: var(--cyan); }

.px-row--bg .px-chip:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0,255,255,0.07);
}

.px-row--bg .px-chip--active {
  color: var(--black);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 2px var(--cyan), inset 0 0 2px var(--cyan);
}

.px-row--bg .px-chip--active:hover {
  color: var(--black);
  background: var(--cyan);
}

/* ── DARK row: yellow accent ──────────────────────────────────── */
.px-row--dark .px-label { color: var(--yellow); }

.px-row--dark .px-chip:hover {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(255,255,0,0.07);
}

.px-row--dark .px-chip--active {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 2px var(--yellow), inset 0 0 2px var(--yellow);
}

.px-row--dark .px-chip--active:hover {
  color: var(--black);
  background: var(--yellow);
}

/* ── Shared chip base ─────────────────────────────────────────── */
.px-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  min-width: 2.2rem;
  text-align: right;
}

.px-chips {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.px-chip {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--dim);
  background: #0d1e20;
  border: 1px solid #142a2e;
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  transition: color 0.08s, border-color 0.08s, background 0.08s, box-shadow 0.08s;
  line-height: 1;
  min-width: 1.8rem;
  text-align: center;
}

/* ── Sections + separator ────────────────────────────────────────── */
.px-section { display: flex; flex-direction: column; gap: 0.5rem; }

.px-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, #0d2a2e, transparent);
  margin: 0.15rem 0;
}

/* ── RGB sliders ─────────────────────────────────────────────────── */
.px-sliders {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 2.9rem;   /* align with chip area */
}

.px-sliders--dark { padding-left: 2.9rem; }

.px-slider-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.px-slider-label {
  font-family: var(--pixel);
  font-size: 0.45rem;
  font-weight: normal;
  min-width: 1.8rem;
  text-align: center;
}

.px-slider-label--r      { color: #ff4444; }
.px-slider-label--g      { color: #44ff44; }
.px-slider-label--b      { color: #4488ff; }
.px-slider-label--bright { color: var(--yellow); font-size: 0.38rem; }

.px-slider-val {
  font-family: var(--pixel);
  font-size: 0.4rem;
  color: var(--dim);
  min-width: 1.6rem;
  text-align: right;
}

/* Range input base */
.px-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 108px;
  height: 4px;
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  border-radius: 0;
  flex-shrink: 0;
}

/* Filled-track effect using a gradient that updates via --pct (set by JS) */
.px-slider--r {
  background: linear-gradient(90deg,
    #cc2222 0%,
    #ff4444 var(--pct, 100%),
    #1a0505 var(--pct, 100%),
    #1a0505 100%);
}
.px-slider--g {
  background: linear-gradient(90deg,
    #228822 0%,
    #44ff44 var(--pct, 100%),
    #051a05 var(--pct, 100%),
    #051a05 100%);
}
.px-slider--b {
  background: linear-gradient(90deg,
    #2244cc 0%,
    #4488ff var(--pct, 100%),
    #05051a var(--pct, 100%),
    #05051a 100%);
}
.px-slider--bright {
  background: linear-gradient(90deg,
    #111111 0%,
    #cccccc var(--pct, 8%),
    #1a1a1a var(--pct, 8%),
    #1a1a1a 100%);
  width: 108px;
}

/* Thumb — square, no border-radius */
.px-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 7px;
  height: 13px;
  cursor: pointer;
  border: none;
  border-radius: 0;
}
.px-slider::-moz-range-thumb {
  width: 7px;
  height: 13px;
  cursor: pointer;
  border: none;
  border-radius: 0;
}

.px-slider--r::-webkit-slider-thumb      { background: #ff6666; }
.px-slider--g::-webkit-slider-thumb      { background: #66ff66; }
.px-slider--b::-webkit-slider-thumb      { background: #6699ff; }
.px-slider--bright::-webkit-slider-thumb { background: var(--yellow); }
.px-slider--beh::-webkit-slider-thumb    { background: var(--magenta); }
.px-slider--r::-moz-range-thumb          { background: #ff6666; }
.px-slider--g::-moz-range-thumb          { background: #66ff66; }
.px-slider--b::-moz-range-thumb          { background: #6699ff; }
.px-slider--bright::-moz-range-thumb     { background: var(--yellow); }
.px-slider--beh::-moz-range-thumb        { background: var(--magenta); }

/* ── Behavior sliders (GAZE / WAND / VAR / VERT / OBJ) ─────────── */
.px-section--behavior {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 0.15rem;
}

.px-slider-label--beh {
  color: var(--magenta);
  min-width: 2.4rem;
  font-size: 0.38rem;
  text-align: right;
}

.px-slider--beh {
  background: linear-gradient(90deg,
    var(--magenta) 0%,
    var(--magenta) var(--pct, 50%),
    #1a0a1a var(--pct, 50%),
    #1a0a1a 100%);
  width: 108px;
}

/* ── Panel action buttons (RANDOMIZE / RESET) ──────────────────── */
.px-section--actions {
  flex-direction: row;
  gap: 0.5rem;
}

.px-action-btn {
  flex: 1;
  font-family: var(--pixel);
  font-size: 0.42rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: transparent;
  padding: 0.5rem 0.4rem;
  cursor: pointer;
  transition: all 0.1s;
}

.px-action-btn--randomize {
  color: var(--magenta);
  border: 1px solid var(--magenta);
}

.px-action-btn--randomize:hover {
  background: var(--magenta);
  color: var(--black);
  text-shadow: none;
  box-shadow: 0 0 4px var(--magenta);
}

.px-action-btn--reset {
  color: var(--green);
  border: 1px solid var(--green);
}

.px-action-btn--reset:hover {
  background: var(--green);
  color: var(--black);
  text-shadow: none;
  box-shadow: 0 0 4px var(--green);
}
