
/* ══════════════════════════════════════════════
   ZEROFORGE — RETRO TERMINAL DESIGN SYSTEM
   zero-forge.org
══════════════════════════════════════════════ */

:root {
  --bg:         #0a0000;
  --bg-dim:     #110000;
  --red:        #cc2200;
  --red-dim:    #661100;
  --red-bright: #ff3300;
  --text:       #cc2200;
  --text-dim:   #661100;
  --border:     #cc2200;
  --border-dim: #3a0a00;
  --font:       'JetBrains Mono', 'Courier New', Courier, monospace;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: var(--red-dim);
}
a:hover { color: var(--red-bright); text-decoration-color: var(--red-bright); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  padding: 2rem 0 0.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.logo-link {
  text-decoration: none;
  border: none;
}

.ascii-logo {
  color: var(--red);
  font-family: var(--font);
  font-size: clamp(0.3rem, 1.1vw, 0.7rem);
  line-height: 1.2;
  white-space: pre;
  overflow-x: auto;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
  display: block;
}

.tagline {
  color: var(--red-dim);
  font-size: 0.9rem;
  padding: 0.25rem 0 0.75rem;
  letter-spacing: 0.05em;
}

/* ── CURSOR BLINK ───────────────────────────────── */
.cursor {
  display: inline-block;
  width: 0.6em;
  background: var(--red-dim);
  color: transparent;
  animation: blink 1s step-end infinite;
  user-select: none;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── NAV ────────────────────────────────────────── */
.site-nav {
  background: var(--bg-dim);
  border-bottom: 1px solid var(--border-dim);
  padding: 0.6rem 0;
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: center;
}

.site-nav a {
  color: var(--red-dim);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid transparent;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transition: none;
}
.site-nav a::before { content: '[ '; }
.site-nav a::after  { content: ' ]'; }

.site-nav a:hover,
.site-nav a.active {
  color: var(--red);
  border-color: var(--red);
  background: rgba(204, 34, 0, 0.08);
}

/* ── MAIN ───────────────────────────────────────── */
main { padding: 2rem 0 3rem; }

/* ── SECTION HEADER ─────────────────────────────── */
.section-header {
  color: var(--red);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  margin-top: 2rem;
}
.section-header:first-child { margin-top: 0; }

/* ── BOX ────────────────────────────────────────── */
.box {
  border: 1px solid var(--border-dim);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.box::before {
  content: '╔════════╗';
  position: absolute;
  top: -1px;
  left: 0;
  font-size: 0.85rem;
  color: var(--red-dim);
  line-height: 1;
}
.box-title {
  color: var(--red);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* ── LISTINGS GRID ──────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.listing-card {
  border: 1px solid var(--border-dim);
  padding: 1rem;
  position: relative;
  background: var(--bg-dim);
  transition: none;
}
.listing-card:hover {
  border-color: var(--red);
  background: rgba(204, 34, 0, 0.05);
}

.card-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--bg);
  background: var(--red-dim);
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card-title {
  font-size: 0.9rem;
  color: var(--red);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--red-dim);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  border-top: 1px solid var(--border-dim);
  padding-top: 0.5rem;
  margin-top: auto;
}

.badge-free {
  color: var(--red);
  border: 1px solid var(--red-dim);
  padding: 0.05rem 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.badge-premium {
  color: var(--bg);
  background: var(--red);
  padding: 0.05rem 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-block;
  color: var(--red);
  border: 1px solid var(--red);
  background: transparent;
  padding: 0.4rem 1rem;
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  transition: none;
}
.btn::before { content: '[ '; }
.btn::after  { content: ' ]'; }
.btn:hover,
.btn:focus {
  background: rgba(204, 34, 0, 0.12);
  color: var(--red-bright);
  border-color: var(--red-bright);
  outline: none;
}

.btn-primary {
  background: rgba(204, 34, 0, 0.15);
  border-color: var(--red);
}
.btn-primary:hover {
  background: rgba(204, 34, 0, 0.25);
}

/* ── SEARCH BAR ─────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-dim);
  padding: 0.5rem 0.75rem;
  background: var(--bg-dim);
  margin-bottom: 1rem;
}
.search-prompt {
  color: var(--red);
  user-select: none;
  font-size: 1rem;
}
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--red);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  caret-color: var(--red);
}
.search-bar input::placeholder { color: var(--red-dim); }
.search-bar button {
  background: transparent;
  border: 1px solid var(--red-dim);
  color: var(--red-dim);
  font-family: var(--font);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: none;
}
.search-bar button:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(204,34,0,0.08);
}

#search-results { margin-top: 0.5rem; }
.search-result-item {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.82rem;
  color: var(--red-dim);
}
.search-result-item a { font-size: 0.9rem; }
.search-no-results { color: var(--red-dim); font-size: 0.82rem; padding: 0.5rem; }

/* ── DONATION / KOFI ────────────────────────────── */
.kofi-section {
  border: 1px solid var(--border-dim);
  padding: 1.25rem;
  background: var(--bg-dim);
  margin: 2rem 0;
  text-align: center;
}
.kofi-label {
  color: var(--red-dim);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.kofi-link {
  display: inline-block;
  border: 1px solid var(--red);
  color: var(--red);
  text-decoration: none;
  padding: 0.5rem 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(204,34,0,0.08);
}
.kofi-link::before { content: '[ '; }
.kofi-link::after  { content: ' ]'; }
.kofi-link:hover   { background: rgba(204,34,0,0.2); color: var(--red-bright); border-color: var(--red-bright); }
.kofi-sub {
  color: var(--red-dim);
  font-size: 0.72rem;
  margin-top: 0.5rem;
  display: block;
}

/* ── FORM ───────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  color: var(--red-dim);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-dim);
  border: 1px solid var(--border-dim);
  color: var(--red);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  resize: vertical;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--red); }
.form-input::placeholder { color: var(--red-dim); }
.form-input::before { content: '> '; }
.form-hint {
  color: var(--red-dim);
  font-size: 0.72rem;
  margin-top: 0.3rem;
  display: block;
}
.form-select option { background: var(--bg); color: var(--red); }

/* ── FILTER TAGS ────────────────────────────────── */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-tag {
  border: 1px solid var(--border-dim);
  color: var(--red-dim);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: transparent;
  font-family: var(--font);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}
.filter-tag:hover,
.filter-tag.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(204,34,0,0.08);
}

/* ── BBS / ZERODEN ──────────────────────────────── */
.bbs-thread {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.85rem;
}
.bbs-num {
  color: var(--red-dim);
  min-width: 3rem;
  font-size: 0.75rem;
  padding-top: 0.1rem;
}
.bbs-title a {
  color: var(--red);
  font-size: 0.88rem;
}
.bbs-title a:hover { color: var(--red-bright); }
.bbs-meta { color: var(--red-dim); font-size: 0.72rem; margin-top: 0.2rem; }
.bbs-replies {
  margin-left: auto;
  color: var(--red-dim);
  font-size: 0.72rem;
  white-space: nowrap;
  padding-top: 0.1rem;
}

/* ── ARCADE ─────────────────────────────────────── */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.arcade-card {
  border: 1px solid var(--border-dim);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;
  background: var(--bg-dim);
}
.arcade-card:hover { border-color: var(--red); background: rgba(204,34,0,0.06); }
.arcade-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.arcade-name { color: var(--red); font-size: 1rem; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.arcade-desc { color: var(--red-dim); font-size: 0.78rem; }
.game-area {
  border: 1px solid var(--red);
  background: #000;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 1rem;
}
#game-canvas { display: block; }
.game-controls { color: var(--red-dim); font-size: 0.78rem; text-align: center; }
.hidden { display: none !important; }

/* ── SYS MSG ────────────────────────────────────── */
.sys-msg {
  color: var(--red-dim);
  font-size: 0.78rem;
  border-left: 2px solid var(--red-dim);
  padding: 0.4rem 0.75rem;
  background: var(--bg-dim);
}

/* ── UTILITY ────────────────────────────────────── */
.text-muted  { color: var(--red-dim); }
.text-dim    { color: var(--red-dim); }
.text-bright { color: var(--red-bright); }
.text-center { text-align: center; }
.text-small  { font-size: 0.78rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-dim);
  padding: 1.5rem 0;
  background: var(--bg-dim);
}
.footer-line {
  color: var(--red-dim);
  font-size: 0.7rem;
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
}
.footer-text {
  color: var(--red-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.4rem 0;
}
.footer-text a { color: var(--red-dim); }
.footer-text a:hover { color: var(--red); }

/* ── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dim); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── MOBILE ─────────────────────────────────────── */
@media (max-width: 600px) {
  .ascii-logo { font-size: 0.22rem; }
  .listings-grid { grid-template-columns: 1fr; }
  .arcade-grid { grid-template-columns: 1fr; }
  .nav-inner { gap: 0.25rem; }
  .site-nav a { font-size: 0.72rem; padding: 0.15rem 0.3rem; }
}
