/* ════════════════════════════════════════════════
   GINGUGU.COM — 90s h@x0rZ terminal
   ════════════════════════════════════════════════ */

:root {
  --green: #00ff41;
  --green-dim: #008f24;
  --green-dark: #003b10;
  --amber: #ffb000;
  --red: #ff3e3e;
  --bg: #020a02;
  --font: "Courier New", Courier, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.45);
}

/* ──────────── matrix rain canvas ──────────── */
#rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}

/* ──────────── CRT overlay ──────────── */
.crt {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: flicker 0.15s infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

@keyframes flicker {
  0%   { opacity: 1; }
  50%  { opacity: 0.96; }
  100% { opacity: 1; }
}

/* ──────────── layout ──────────── */
.terminal {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

section { margin-bottom: 48px; }

.hidden-until-boot {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.booted .hidden-until-boot {
  opacity: 1;
  transform: none;
}

/* ──────────── boot log ──────────── */
.boot-log {
  font-size: 14px;
  color: var(--green-dim);
  white-space: pre-wrap;
  min-height: 7em;
}

.boot-log .ok { color: var(--green); }

/* ──────────── hero ──────────── */
.ascii-logo {
  font-size: clamp(6px, 1.55vw, 14px);
  line-height: 1.15;
  color: var(--green);
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.8);
  overflow-x: auto;
  margin-bottom: 24px;
}

.tagline {
  font-size: clamp(16px, 2.6vw, 24px);
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--green-dim);
  max-width: 620px;
  margin-bottom: 22px;
}

.cursor {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.badges { display: flex; flex-wrap: wrap; gap: 10px; }

.badge {
  font-size: 12px;
  color: var(--green-dim);
  border: 1px solid var(--green-dark);
  padding: 2px 8px;
}

.badge-hot { color: var(--amber); border-color: #5c3d00; }

/* ──────────── glitch ──────────── */
.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.booted .glitch {
  animation: glitch-skew 4s infinite;
}

@keyframes glitch-skew {
  0%, 92%, 100% { transform: none; filter: none; }
  93% { transform: translate(-2px, 1px) skewX(2deg); filter: hue-rotate(90deg); }
  94% { transform: translate(2px, -1px); filter: none; }
  96% { transform: translate(-1px, 0) skewX(-1deg); filter: hue-rotate(-60deg); }
  97% { transform: none; filter: none; }
}

/* ──────────── command blocks ──────────── */
.cmdline {
  color: var(--green);
  margin-bottom: 12px;
  font-weight: bold;
}

.prompt { color: var(--amber); }

.output { color: var(--green-dim); }

.output p { margin-bottom: 12px; max-width: 680px; }

.hl { color: var(--green); font-weight: bold; }
.hl-red { color: var(--red); font-weight: bold; }
.dim { color: var(--green-dim); }

em { color: var(--green); font-style: italic; }

/* ──────────── features ──────────── */
.feature-grid { display: grid; gap: 8px; }

.feature { padding-left: 1em; text-indent: -1em; }

.f-key { color: var(--amber); }

/* ──────────── tools ──────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 18px;
}

.tools-grid span { color: var(--green); }
.tools-grid span::before { content: "▸ "; color: var(--green-dark); }

/* ──────────── demo ──────────── */
.demo-pre {
  white-space: pre-wrap;
  font-size: 14px;
  border-left: 2px solid var(--green-dark);
  padding-left: 14px;
}

/* ──────────── install ──────────── */
.install-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid var(--green-dark);
  background: rgba(0, 255, 65, 0.04);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.install-box code { color: var(--green); word-break: break-all; }

.copy-btn {
  background: none;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: var(--font);
  font-size: 13px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--green);
  color: #000;
  text-shadow: none;
}

/* ──────────── links ──────────── */
.links { display: grid; gap: 8px; }

.links a {
  color: var(--green);
  text-decoration: none;
}

.links a:hover {
  color: #000;
  background: var(--green);
  text-shadow: none;
}

/* ──────────── footer ──────────── */
footer {
  color: var(--green-dim);
  text-align: center;
  margin-top: 60px;
}

.footer-line { overflow: hidden; white-space: nowrap; }

footer p { margin-top: 10px; }

/* ──────────── comparison table ──────────── */
.cmp-wrap { overflow-x: auto; }

.cmp-table {
  border-collapse: collapse;
  font-size: 12px;
  width: 100%;
  min-width: 580px;
}

.cmp-table th,
.cmp-table td {
  border: 1px solid var(--green-dark);
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
}

.cmp-table th:first-child,
.cmp-table td:first-child {
  text-align: left;
  color: var(--green-dim);
  white-space: normal;
  min-width: 160px;
}

.cmp-table th {
  color: var(--amber);
  background: rgba(0, 255, 65, 0.04);
}

.cmp-table th.col-us,
.cmp-table td.col-us {
  color: var(--green);
  border-left-color: var(--green-dim);
  border-right-color: var(--green-dim);
}

.cmp-yes  { color: var(--green); }
.cmp-warn { color: var(--amber); }
.cmp-no   { color: var(--red); }

.cmp-note {
  font-size: 12px;
  color: var(--green-dim);
  margin-top: 10px;
  max-width: 100%;
}

/* ──────────── reduced motion ──────────── */
@media (prefers-reduced-motion: reduce) {
  .crt { animation: none; }
  body.booted .glitch { animation: none; }
  .cursor { animation: none; }
  #rain { display: none; }
}
