:root {
  --bg: #050505;
  --panel: #0b0e14;
  --panel-2: #10141d;
  --line: rgba(0, 212, 255, 0.25);
  --line-soft: rgba(0, 212, 255, 0.12);
  --cyan: #00d4ff;
  --gold: #ffd700;
  --red: #ff0040;
  --green: #00ff88;
  --text: #dce7f0;
  --muted: #7f94a3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, "Andale Mono", monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: 0 0 8px rgba(0, 212, 255, 0.8); }

/* ---- starfield + grid background ---- */
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0.15;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.08; transform: scale(1); }
  to   { opacity: 0.8; transform: scale(1.6); }
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 70%);
}
.scanline {
  position: fixed; left: 0; right: 0; height: 120px; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, 0.035), transparent);
  animation: scan 8s linear infinite;
}
@keyframes scan { from { top: -140px; } to { top: 110vh; } }

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
header { position: sticky; top: 0; z-index: 10; background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 0 14px rgba(0, 212, 255, 0.35); }
.brand .name { font-size: 15px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.brand .sub { font-size: 10px; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.nav-links a:hover { color: var(--cyan); }
.nav-links .on { color: var(--cyan); }
.lang {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  padding: 6px 14px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; border-radius: 4px; font-family: inherit;
}
.lang:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(0, 212, 255, 0.4); }

/* ---- hero (masthead) ---- */
.mast { text-align: center; padding: 56px 0 36px; }
.mast h1 { font-size: clamp(24px, 4.5vw, 40px); margin: 0 0 8px; letter-spacing: 4px; text-transform: uppercase; color: #fff; text-shadow: 0 0 18px rgba(0, 212, 255, 0.6); }
.mast .tagline { font-size: 12px; color: var(--cyan); letter-spacing: 3px; text-transform: uppercase; margin: 0; }

/* ---- release blocks ---- */
.rel {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 24px; margin: 22px 0; position: relative; overflow: hidden;
}
.rel::before { content: "▚"; position: absolute; top: 12px; right: 16px; color: var(--line); font-size: 18px; }
.rel.latest { border-color: var(--line); box-shadow: 0 0 24px rgba(0, 212, 255, 0.12); }

.rel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; }
.ver {
  font-weight: 700; letter-spacing: 2px; padding: 5px 12px; border-radius: 999px;
  font-size: 14px; color: #fff; background: linear-gradient(180deg, #0e2a38, #06222e);
  border: 1px solid var(--cyan); box-shadow: 0 0 14px rgba(0, 212, 255, 0.45);
}
.ver.latest { animation: vern 2.2s ease-in-out infinite; }
@keyframes vern {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.35); }
  50% { box-shadow: 0 0 22px rgba(0, 212, 255, 0.85); }
}
.rel-date { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.rel-lead { margin: 0 0 18px; color: var(--text); font-size: 14px; max-width: 800px; }

/* ---- features ---- */
.feature {
  display: flex; flex-direction: row; gap: 18px; align-items: flex-start;
  border-top: 1px solid var(--line-soft); padding: 18px 0;
}
.feature:first-of-type { border-top: none; padding-top: 4px; }
.feat-text { flex: 1; min-width: 0; }
.feat-badge {
  display: inline-block; font-size: 10px; letter-spacing: 2px; font-weight: 700;
  padding: 2px 8px; border-radius: 3px; vertical-align: middle; margin: 4px 0 6px;
}
.feat-badge.new { color: #001014; background: var(--green); box-shadow: 0 0 10px rgba(0, 255, 136, 0.45); }
.feat-badge.fixed { color: #1a1400; background: var(--gold); box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.feat-badge.improved { color: #001014; background: var(--cyan); box-shadow: 0 0 10px rgba(0, 212, 255, 0.4); }
.feat-text h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.feat-text p { margin: 0; font-size: 13px; color: var(--muted); }
.feat-shot {
  position: relative; flex-shrink: 0;
  width: 250px; max-width: 100%;
}
.feat-shot img {
  width: 100%; height: auto;
  border-radius: 8px; display: block;
  border: 1px solid var(--line-soft);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.feature:nth-child(even) { flex-direction: row-reverse; }

/* ---- history ---- */
section .h2 { font-size: 20px; letter-spacing: 4px; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 12px rgba(0, 212, 255, 0.4); margin: 40px 0 8px; }
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hist {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 16px 18px; position: relative; overflow: hidden;
}
.hist .v { font-weight: 700; letter-spacing: 2px; color: var(--cyan); font-size: 14px; margin: 0 0 2px; }
.hist .d { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.hist .n { margin: 0; font-size: 12px; color: var(--muted); }

/* ---- feature gallery (features.html) ---- */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.feat-card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 14px; overflow: hidden;
}
.feat-card .feat-shot { width: 100%; margin: 0 0 12px; }
.feat-card h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.feat-card p { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.feat-ver { font-size: 10px; letter-spacing: 2px; color: var(--muted); opacity: 0.65; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line-soft); padding: 26px 0 40px; color: var(--muted); font-size: 12px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
footer .id { letter-spacing: 2px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); }

@media (max-width: 600px) {
  .nav { padding: 10px 16px; flex-wrap: wrap; row-gap: 8px; }
  .brand .sub { display: none; }
  .nav-links { gap: 10px; }
  .feature { flex-direction: column; }
  .feature:nth-child(even) { flex-direction: column; }
  .feat-shot { width: 100%; }
  .mast { padding: 40px 0 24px; }
}