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

:root {
  --bg:          #080808;
  --bg2:         #0e0e0e;
  --bg3:         #131313;
  --green:       #00ff41;
  --green2:      #00cc33;
  --green3:      #003d0f;
  --amber:       #ffb000;
  --red:         #ff2244;
  --text:        #c8f0d0;
  --muted:       #4a6650;
  --border:      #1a3320;
  --shadow-g:    0 0 8px rgba(0,255,65,.4), 0 0 30px rgba(0,255,65,.08);
  --font-px:     'Press Start 2P', monospace;
  --font-vt:     'VT323', monospace;
  --font-mono:   'Share Tech Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-vt);
  font-size: 20px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scanlines */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.22) 3px);
  pointer-events: none;
  z-index: 9000;
}

/* Vignette */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.65) 100%);
  pointer-events: none;
  z-index: 9001;
}

@keyframes flicker {
  0%,96%,100% { opacity:1 }
  97%          { opacity:.93 }
  98%          { opacity:.98 }
}
body { animation: flicker 9s infinite; }

/* ── Layout ─────────────────────────────────────────────── */
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 28px;
}

.logo {
  font-family: var(--font-px);
  font-size: 9px;
  color: var(--green);
  text-shadow: var(--shadow-g);
  text-decoration: none;
  letter-spacing: 1px;
}
.logo em { color: var(--amber); font-style: normal; }

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }

.site-nav a {
  font-family: var(--font-px);
  font-size: 6px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid transparent;
  letter-spacing: 1px;
  transition: all .1s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--green);
  border-color: var(--border);
  background: rgba(0,255,65,.04);
  text-shadow: var(--shadow-g);
}

/* ── Window chrome ──────────────────────────────────────── */
.win {
  border: 1px solid var(--border);
  background: var(--bg2);
  margin-bottom: 20px;
}

.win-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.dots { display: flex; gap: 5px; }
.dot  { width: 8px; height: 8px; border-radius: 50%; }
.dot.r { background: var(--red);   box-shadow: 0 0 4px var(--red); }
.dot.y { background: var(--amber); box-shadow: 0 0 4px var(--amber); }
.dot.g { background: var(--green); box-shadow: 0 0 4px var(--green); }

.win-title {
  font-family: var(--font-px);
  font-size: 6px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-left: 4px;
}

.win-body { padding: 24px; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-px);
  color: var(--green);
  text-shadow: var(--shadow-g);
  line-height: 1.5;
}
h1 { font-size: 13px; margin-bottom: 16px; }
h2 { font-size: 10px; margin-bottom: 14px; }
h3 { font-size: 8px; margin-bottom: 10px; color: var(--amber); text-shadow: 0 0 8px rgba(255,176,0,.4); }

p { font-family: var(--font-vt); font-size: 20px; color: var(--text); margin-bottom: 10px; }

.mono { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

hr.div {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* ── Glitch ─────────────────────────────────────────────── */
@keyframes g1 {
  0%,90%,100% { clip-path: inset(0 0 100% 0); transform: translate(0) }
  91% { clip-path: inset(25% 0 45% 0); transform: translate(-3px) }
  93% { clip-path: inset(60% 0 10% 0); transform: translate(3px) }
  96% { clip-path: inset(40% 0 30% 0); transform: translate(-1px) }
}
@keyframes g2 {
  0%,87%,100% { clip-path: inset(0 0 100% 0); transform: translate(0) }
  88% { clip-path: inset(15% 0 55% 0); transform: translate(3px); color: #ff2244 }
  91% { clip-path: inset(65% 0 5% 0);  transform: translate(-2px); color: #00eeff }
}

.glitch { position: relative; display: inline-block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  font-family: inherit; font-size: inherit;
}
.glitch::before { animation: g1 8s infinite; color: var(--red); }
.glitch::after  { animation: g2 8s infinite .4s; color: #00eeff; }

/* ── Blink ──────────────────────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.cursor::after {
  content: '█';
  color: var(--green);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  font-family: var(--font-px);
  font-size: 6px;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 1px;
  transition: all .1s;
}
.btn:hover {
  color: var(--bg);
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 14px rgba(0,255,65,.5);
}
.btn.amber { color: var(--amber); border-color: rgba(255,176,0,.25); }
.btn.amber:hover { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 14px rgba(255,176,0,.5); color: var(--bg); }

/* ── Nav cards (home) ───────────────────────────────────── */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.nav-card {
  border: 1px solid var(--border);
  background: var(--bg3);
  padding: 18px 16px;
  text-decoration: none;
  color: var(--text);
  display: block;
  position: relative;
  overflow: hidden;
  transition: all .15s;
}
.nav-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--green);
  transition: width .25s;
}
.nav-card:hover::after { width: 100%; }
.nav-card:hover {
  border-color: var(--green);
  background: rgba(0,255,65,.03);
  box-shadow: 0 0 20px rgba(0,255,65,.08);
}

.nav-card-icon  { font-size: 26px; display: block; margin-bottom: 10px; }
.nav-card-title {
  font-family: var(--font-px);
  font-size: 6px;
  color: var(--green);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.nav-card-desc  { font-size: 17px; color: var(--muted); }

/* ── Status bar ─────────────────────────────────────────── */
.status-bar {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 4px 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.ok  { color: var(--green); }
.err { color: var(--red); }

/* ── Video grid ─────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.video-item {
  background: #000;
  border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
}
.video-item:hover {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(0,255,65,.12);
}
.video-item iframe {
  width: 100%; aspect-ratio: 16/9;
  display: block; border: none;
}
.video-title {
  font-family: var(--font-vt);
  font-size: 16px;
  color: var(--muted);
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Photo grid ─────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-top: 16px;
}
.photo-item {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  background: var(--bg3);
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.8) brightness(.9);
  transition: all .3s;
}
.photo-item::after {
  content: '⊕';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: var(--green);
  background: rgba(0,255,65,.08);
  opacity: 0;
  transition: opacity .2s;
  font-family: monospace;
}
.photo-item:hover img { filter: saturate(1.1) brightness(1.05); transform: scale(1.04); }
.photo-item:hover::after { opacity: 1; }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 8000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0,255,65,.15);
}
.lb-title {
  font-family: var(--font-vt);
  font-size: 20px;
  color: var(--muted);
  margin-top: 12px;
}
.lb-nav {
  position: fixed; inset: 0;
  pointer-events: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.lb-btn {
  font-family: var(--font-px); font-size: 10px;
  color: var(--green);
  background: rgba(0,0,0,.7);
  border: 1px solid var(--border);
  padding: 10px 14px;
  cursor: pointer;
  pointer-events: all;
  transition: all .1s;
}
.lb-btn:hover { background: var(--green); color: var(--bg); }
.lb-close {
  position: fixed; top: 14px; right: 18px;
  font-family: var(--font-px); font-size: 7px;
  color: var(--red);
  background: transparent;
  border: 1px solid rgba(255,34,68,.35);
  padding: 7px 11px;
  cursor: pointer; z-index: 8100;
  transition: all .1s;
}
.lb-close:hover { background: var(--red); color: #fff; }

/* ── Channels ───────────────────────────────────────────── */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.channel-card {
  border: 1px solid var(--border);
  background: var(--bg3);
  padding: 16px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 6px;
  transition: all .15s;
}
.channel-card:hover { border-color: var(--green); box-shadow: 0 0 16px rgba(0,255,65,.1); }
.ch-platform { font-family: var(--font-px); font-size: 5px; color: var(--muted); letter-spacing: 1px; }
.ch-name { font-family: var(--font-px); font-size: 7px; color: var(--green); text-shadow: var(--shadow-g); line-height: 1.6; }
.ch-desc { font-size: 17px; color: var(--muted); }
.ch-url { font-family: var(--font-mono); font-size: 11px; color: var(--green2); margin-top: auto; }

/* ── About tags ─────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag {
  font-family: var(--font-px); font-size: 5px;
  color: var(--green); border: 1px solid var(--border);
  padding: 5px 10px; letter-spacing: 1px;
}

/* ── State ──────────────────────────────────────────────── */
.state {
  font-family: var(--font-px); font-size: 7px;
  padding: 30px; text-align: center;
  letter-spacing: 2px; grid-column: 1/-1;
}
.state.loading { color: var(--muted); }
.state.error   { color: var(--red); border: 1px solid rgba(255,34,68,.25); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.site-footer a { color: var(--green2); text-decoration: none; }
.site-footer a:hover { color: var(--green); }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--green3); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 580px) {
  h1 { font-size: 9px; }
  h2 { font-size: 7px; }
  .nav-grid { grid-template-columns: 1fr 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
}
