/* ---- Design tokens ---- */
:root {
  --bg: #050508;
  --bg-2: #0a0a10;
  --fg: #e0e6ed;
  --muted: #8a909f;
  --accent: #ff00ff; /* neon magenta */
  --accent-2: #00ff9d; /* neon mint */
  --brand: #d800ff;
  --card: #0f0f14;
  --grid-max: 1200px;
  --radius: 8px;
  --shadow: 0 0 20px rgba(255, 0, 255, 0.15);
  --crt-scanline: rgba(18, 16, 16, 0.1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Courier New", Courier, monospace; /* Monospace for that "terminal" feel */
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent-2); text-decoration: none; transition: all 0.2s ease; text-transform: uppercase; letter-spacing: 1px; }
a:hover { color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.wrap { width: 100%; max-width: var(--grid-max); margin: 0 auto; padding: 0 20px; }

/* ---- CRT Overlay Effect ---- */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 9999;
}

/* ---- Glitch Animations ---- */
@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
  20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
  60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
  80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
  100% { clip-path: inset(30% 0 50% 0); transform: translate(1px, -1px); }
}
@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
  20% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 2px); }
  40% { clip-path: inset(30% 0 20% 0); transform: translate(2px, 1px); }
  60% { clip-path: inset(15% 0 80% 0); transform: translate(-1px, -2px); }
  80% { clip-path: inset(55% 0 10% 0); transform: translate(1px, 2px); }
  100% { clip-path: inset(40% 0 30% 0); transform: translate(-2px, 1px); }
}

/* ---- Header ---- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.logo {
  font-weight: 900; letter-spacing: .15em; font-size: 1.4rem;
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--fg);
  text-shadow: 2px 2px 0px var(--accent);
}
.logo .mark { color: var(--accent-2); animation: blink 2s infinite; }

nav ul { list-style: none; display: flex; gap: 1.5rem; padding: 0; margin: 0; }
nav a { font-weight: 700; font-size: 0.9rem; }
nav a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }

.cta {
  padding: .6rem 1.4rem;
  background: var(--accent);
  border: 2px solid var(--accent);
  font-weight: 800; color: #000;
  box-shadow: 4px 4px 0px var(--accent-2);
  transition: transform 0.1s linear, box-shadow 0.1s linear;
  text-transform: uppercase;
}
.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--accent-2);
  background: var(--fg);
}
.cta.outline {
  background: transparent;
  color: var(--accent);
  box-shadow: 4px 4px 0px var(--muted);
}
.cta.outline:hover {
  background: rgba(255, 0, 255, 0.1);
  box-shadow: 6px 6px 0px var(--fg);
}

/* ---- Hero ---- */
#hero {
  position: relative; min-height: 80vh; display: grid; place-items: center; text-align: center;
  overflow: hidden; border-bottom: 1px solid var(--accent-2);
}
.glitch-bg {
  position: absolute; inset: -20%;
  background:
    linear-gradient(45deg, transparent 40%, rgba(255,0,255,0.1) 40%, rgba(255,0,255,0.1) 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(0,255,157,0.1) 40%, rgba(0,255,157,0.1) 60%, transparent 60%);
  background-size: 40px 40px;
  filter: hue-rotate(0deg);
  animation: scan 20s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}
@keyframes scan { 0% { background-position: 0 0; } 100% { background-position: 100% 100%; } }

.hero-inner { position: relative; z-index: 2; padding: 40px; background: rgba(0,0,0,0.6); border: 1px solid var(--muted); }
.tag {
  display: inline-block; padding: .25rem .6rem;
  border: 1px solid var(--accent-2);
  background: rgba(0, 255, 157, 0.1);
  color: var(--accent-2);
  font-size: .75rem; letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 0 0 10px rgba(0,255,157,0.3);
}

.title {
  margin: 20px 0 10px; font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--fg);
  position: relative;
}

/* Glitch Title Effect */
.title .glitch {
  position: relative;
  display: inline-block;
}
.title .glitch::before,
.title .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
}
.title .glitch::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip-path: inset(44% 0 61% 0);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.title .glitch::after {
  left: -2px;
  text-shadow: -1px 0 #00fff9;
  clip-path: inset(54% 0 30% 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.lead {
  max-width: 65ch; margin: 10px auto 30px; color: var(--muted); font-size: 1.2rem;
  border-left: 3px solid var(--accent); padding-left: 15px;
}

.cta-group { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---- Sections ---- */
section { padding: 80px 0; border-bottom: 1px dashed rgba(255,255,255,0.1); }
h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0 0 24px;
  color: var(--accent-2); text-shadow: 0 0 10px rgba(0,255,157,0.4);
  text-transform: uppercase;
}
p.note { color: var(--muted); font-size: 0.85rem; letter-spacing: 1px; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--muted);
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
  transform: translateY(-5px);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.card:hover::before { transform: scaleX(1); }

.card h3 { margin: 4px 0 10px; font-size: 1.4rem; color: var(--fg); }
.chip {
  display: inline-block; padding: .2rem .5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: .7rem; text-transform: uppercase; letter-spacing: 1px;
}

/* ---- Video section ---- */
.video-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 20px; }
.video-card {
  background: #000;
  border: 2px solid #222;
  overflow: hidden;
  position: relative;
}
.video-card:hover { border-color: var(--accent-2); }
.video-info { padding: 16px; background: var(--card); border-top: 1px solid #222; }
.video-info h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--accent-2); }

/* ---- Footer + terminal ---- */
footer {
  border-top: 1px solid var(--accent);
  background: #020203;
  padding-top: 40px; padding-bottom: 40px;
}
.terminal {
  margin-top: 20px;
  background: #000;
  border: 2px solid var(--muted);
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.term-line { color: var(--accent-2); font-weight: bold; }
.caret {
  display: inline-block; width: 10px; height: 1.2em; background: var(--accent-2);
  vertical-align: bottom; margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.term-input {
  width: 100%; margin-top: 10px; padding: 0;
  border: none; background: transparent;
  color: var(--fg); font-family: inherit; font-size: 1rem;
  outline: none;
}

/* ---- Admin Panel Styles ---- */
#admin-login, #admin-panel {
  background: rgba(0,0,0,0.98);
}
.admin-login-box, .admin-section {
  background: #111;
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(255,0,255,0.1);
}
.admin-login-box h2, .admin-header h1, .admin-section h3 {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.admin-section input, .admin-section textarea, .admin-login-box input {
  background: #000;
  border: 1px solid var(--muted);
  color: var(--accent-2);
  font-family: monospace;
}
.admin-section input:focus, .admin-section textarea:focus, .admin-login-box input:focus {
  border-color: var(--accent-2);
  outline: none;
  box-shadow: 0 0 10px rgba(0,255,157,0.2);
}
.admin-save, .admin-login-box button {
  background: var(--accent);
  color: #000;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0;
}
.admin-save:hover, .admin-login-box button:hover {
  background: var(--accent-2);
  box-shadow: 0 0 15px var(--accent-2);
}

.admin-toggle {
  background: var(--accent);
  border: 2px solid #fff;
  color: #000;
  border-radius: 0; /* Square button */
  box-shadow: 4px 4px 0 #000;
}

/* ---- Easter Egg Modal ---- */
#easter-egg-modal {
  background: rgba(0,0,0,0.95);
}
.easter-egg-content {
  background: #000;
  border: 4px solid var(--accent-2);
  box-shadow: 0 0 50px var(--accent-2);
}
.easter-egg-content h2 {
  color: var(--accent-2);
  font-family: "Impact", sans-serif;
  text-transform: uppercase;
  font-size: 3rem;
  transform: rotate(-2deg);
}

@media (max-width: 768px) {
  .title { font-size: 2.5rem; }
  .nav { flex-direction: column; height: auto; padding: 10px; gap: 10px; }
  nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
}
