:root {
  --bg: #0b0b0d;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.04);

  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);

  --accent: #ffffff;
  --accent-2: #7a0b12;
  --accent-3: #b3121f;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  background: radial-gradient(1000px 600px at 15% -10%, rgba(122, 11, 18, 0.35), transparent 55%),
              radial-gradient(900px 500px at 85% 0%, rgba(179, 18, 31, 0.22), transparent 60%),
              var(--bg);
  line-height: 1.6;
  letter-spacing: .2px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  z-index: 0;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 18px 0 8px;
  padding: 20px;
  border-radius: var(--radius);
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(122, 11, 18, 0.35) 0%, transparent 60%),
    rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent-2), var(--accent) 45%, #2a2a2e 60%, var(--accent-2));
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0.45), 0 0 40px rgba(179, 18, 31, 0.25);
  position: relative;
  isolation: isolate;
}

.logo::after {
  content: "G9K";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0b0b0d;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 38px);
  letter-spacing: .8px;
}

.sub { color: var(--muted); margin-top: 4px; }

.toplinks {
  margin-top: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

section { margin: 28px 0; }

section h2 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid rgba(255,255,255,0.08);
}

.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.glitch::before { transform: translate(1px, 0); color: var(--accent); opacity: 0.85; }
.glitch::after  { transform: translate(-1px, 0); color: var(--accent-2); opacity: 0.85; }

.btn {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  line-height: 1;
}

.btn:hover, .btn:focus {
  background: var(--accent);
  color: #0b0b0d;
  box-shadow: 0 0 14px rgba(255,255,255,0.45);
  outline: none;
}

.btn-red {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(179, 18, 31, 0.85);
  border-radius: 6px;
  color: #ffd8dc;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
  background: rgba(122, 11, 18, 0.18);
  cursor: pointer;
  line-height: 1;
}

.btn-red:hover, .btn-red:focus {
  background: rgba(179, 18, 31, 0.95);
  color: #0b0b0d;
  box-shadow: 0 0 14px rgba(179, 18, 31, 0.55);
  outline: none;
}

footer {
  margin: 26px 0 60px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  background:
    radial-gradient(800px 400px at 20% 120%, rgba(122, 11, 18, 0.28) 0%, transparent 60%),
    rgba(0,0,0,0.25);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.sig { opacity: .85; }

@media (max-width: 600px) {
  .logo { width: 48px; height: 48px; }
  footer { flex-direction: column; align-items: flex-start; }
}

body.theme-yellow {
  --accent: #fff3b0;
  --accent-2: #d4a017;
  --accent-3: #ffcc33;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(212, 160, 23, 0.35), transparent 55%),
    radial-gradient(900px 500px at 85% 0%, rgba(255, 204, 51, 0.22), transparent 60%),
    var(--bg);
}

/* 🔴 ZEROZEROZERO — Red / Threat */
body.theme-red {
  --accent: #ffffff;
  --accent-2: #7a0b12;
  --accent-3: #b3121f;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(122, 11, 18, 0.35), transparent 55%),
    radial-gradient(900px 500px at 85% 0%, rgba(179, 18, 31, 0.22), transparent 60%),
    var(--bg);
}

/* ⚙️ GSHIFT — Grey / Archived */
body.theme-grey {
  --accent: #d0d3d6;
  --accent-2: #8b8f94;
  --accent-3: #b0b5bb;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(160, 160, 160, 0.28), transparent 55%),
    radial-gradient(900px 500px at 85% 0%, rgba(200, 200, 200, 0.18), transparent 60%),
    var(--bg);
}

body.theme-yellow {
  --accent-2: #d4a017;   /* yellow */
  --accent-3: #ffcc33;   /* yellow highlight */
}

/* kill red buttons */
body.theme-yellow .btn-red {
  border-color: #d4a017 !important;
  color: #fff3b0 !important;
  background: rgba(212, 160, 23, 0.18) !important;
  box-shadow: 0 0 14px rgba(212, 160, 23, 0.45) !important;
}

/* header/footer glow */
body.theme-yellow header,
body.theme-yellow footer {
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(212, 160, 23, 0.35), transparent 60%),
    rgba(0,0,0,0.25) !important;
}

/* ---------- GSHIFT (GREY) ---------- */
body.theme-grey {
  --accent-2: #8b8f94;   /* grey */
  --accent-3: #b0b5bb;
}

/* kill red buttons */
body.theme-grey .btn-red {
  border-color: #8b8f94 !important;
  color: #e0e0e0 !important;
  background: rgba(139, 143, 148, 0.18) !important;
  box-shadow: 0 0 14px rgba(139, 143, 148, 0.45) !important;
}

/* header/footer glow */
body.theme-grey header,
body.theme-grey footer {
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(160, 160, 160, 0.28), transparent 60%),
    rgba(0,0,0,0.25) !important;
}

/* ---------- ZEROZEROZERO (RED) ---------- */
/* explicitly allow red ONLY here */
body.theme-red {
  --accent-2: #7a0b12;
  --accent-3: #b3121f;
}

a.btn[href*="kiverix.net"] {
  border-color: #ffffff !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.35) !important;
}

/* hover / focus */
a.btn[href*="kiverix.net"]:hover,
a.btn[href*="kiverix.net"]:focus {
  background: #ffffff !important;
  color: #0b0b0d !important;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.65) !important;
}

.archive-pages .btn,
.archive-pages a {
  transition: all 0.2s ease;
}

/* hover / focus */
.archive-pages .btn:hover,
.archive-pages .btn:focus,
.archive-pages a:hover,
.archive-pages a:focus {
  background: var(--accent-2);
  color: #0b0b0d;
  box-shadow: 0 0 18px rgba(212, 160, 23, 0.65);
}

body.theme-yellow a.btn-red,
body.theme-grey a.btn-red,
body.theme-red a.btn-red {
  transition: all 0.2s ease !important;
}

/* YELLOW page: .btn-red hover should act like its theme color */
body.theme-yellow a.btn-red:hover,
body.theme-yellow a.btn-red:focus {
  background: var(--accent-2) !important;
  color: #0b0b0d !important;
  box-shadow: 0 0 18px rgba(212, 160, 23, 0.65) !important;
  outline: none !important;
}

/* GREY page: .btn-red hover should act like its theme color */
body.theme-grey a.btn-red:hover,
body.theme-grey a.btn-red:focus {
  background: var(--accent-2) !important;
  color: #0b0b0d !important;
  box-shadow: 0 0 18px rgba(139, 143, 148, 0.55) !important;
  outline: none !important;
}

/* RED page: keep the normal red hover, but ensure transition matches */
body.theme-red a.btn-red:hover,
body.theme-red a.btn-red:focus {
  background: rgba(179, 18, 31, 0.95) !important;
  color: #0b0b0d !important;
  box-shadow: 0 0 14px rgba(179, 18, 31, 0.55) !important;
  outline: none !important;
}