:root {
  --bg: #12140f;
  --panel: #1c2016;
  --panel-2: #232817;
  --border: #3a4228;
  --border-lit: #566338;
  --grass: #7fb356;
  --grass-dark: #4f7a34;
  --amber: #e3a94a;
  --amber-dark: #a5762c;
  --red: #c1554a;
  --red-dark: #8a382f;
  --text: #eef0e2;
  --text-dim: #a9b39a;
  --text-faint: #6f7a60;
  --shadow-hi: rgba(255,255,255,0.07);
  --shadow-lo: rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}
.pixel { font-family: "Silkscreen", "VT323", monospace; }
a { color: var(--amber); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px 80px; }

header.top { border-bottom: 4px solid var(--border); background: var(--panel); }
.top-inner {
  max-width: 880px; margin: 0 auto; padding: 22px 20px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.logo-block {
  width: 38px; height: 38px; flex: none;
  background: linear-gradient(160deg, var(--grass) 0%, var(--grass-dark) 100%);
  border: 3px solid var(--border-lit);
  box-shadow: inset 3px 3px 0 var(--shadow-hi), inset -3px -3px 0 var(--shadow-lo);
}
h1.site-title { font-family: "Silkscreen", monospace; font-size: 22px; margin: 0; letter-spacing: 0.5px; }
.tagline { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

nav.tabs { max-width: 880px; margin: 0 auto; padding: 0 20px; display: flex; gap: 8px; flex-wrap: wrap; transform: translateY(2px); }
.tab-btn {
  font-family: "Silkscreen", monospace; font-size: 12px;
  background: var(--panel-2); color: var(--text-dim);
  border: 3px solid var(--border); border-bottom: none;
  padding: 10px 16px; cursor: pointer; box-shadow: inset 2px 2px 0 var(--shadow-hi);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--bg); color: var(--grass); position: relative; top: 4px; padding-top: 14px; }
.tab-btn:focus-visible, .btn:focus-visible, .copy-btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

main { padding-top: 32px; }
section.tab-panel { display: none; }
section.tab-panel.active { display: block; }

h2.section-title { font-family: "Silkscreen", monospace; font-size: 16px; margin: 0 0 16px; color: var(--text); }

.panel {
  background: var(--panel);
  border: 3px solid var(--border);
  box-shadow: inset 2px 2px 0 var(--shadow-hi), inset -2px -2px 0 var(--shadow-lo);
  padding: 20px;
}

.status-hero { padding: 28px 24px; text-align: center; margin-bottom: 18px; }
.status-hero.online { border-color: var(--grass-dark); }
.status-hero.offline { border-color: var(--red-dark); }
.status-dot { display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: middle; border: 2px solid var(--border); }
.status-hero.online .status-dot { background: var(--grass); box-shadow: 0 0 12px var(--grass); }
.status-hero.offline .status-dot { background: var(--red); box-shadow: 0 0 12px var(--red); }
.status-hero.unknown .status-dot { background: var(--text-faint); }
.status-word { font-family: "Silkscreen", monospace; font-size: 30px; vertical-align: middle; }
.status-hero.online .status-word { color: var(--grass); }
.status-hero.offline .status-word { color: var(--red); }
.status-hero.unknown .status-word { color: var(--text-faint); }
.status-sub { color: var(--text-dim); font-size: 13px; margin-top: 8px; }

.ip-row { display: inline-flex; align-items: center; margin-top: 18px; border: 3px solid var(--border); background: var(--panel-2); }
.ip-text { font-family: "VT323", monospace; font-size: 20px; padding: 8px 14px; color: var(--text); }
.copy-btn { font-family: "Silkscreen", monospace; font-size: 11px; border: none; border-left: 3px solid var(--border); background: var(--amber-dark); color: #fff; padding: 10px 14px; cursor: pointer; }
.copy-btn:active { transform: translateY(1px); }
.meta-line { color: var(--text-dim); font-size: 13px; margin-top: 10px; }
.player-line { color: var(--text); font-size: 14px; margin-top: 6px; }
.note-text { color: var(--text); font-size: 14px; margin-top: 14px; max-width: 60ch; margin-left: auto; margin-right: auto; }

.btn { font-family: "Silkscreen", monospace; font-size: 12px; border: 3px solid var(--border-lit); background: var(--grass-dark); color: #fff; padding: 10px 16px; cursor: pointer; box-shadow: inset 2px 2px 0 rgba(255,255,255,0.15); text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.1); }
.btn.small { font-size: 10px; padding: 6px 10px; }
.btn.secondary { background: var(--panel-2); border-color: var(--border); color: var(--text); }
.btn.danger { background: var(--red-dark); border-color: var(--red); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.grid-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.video-card { padding: 0; overflow: hidden; }
.video-media { width: 100%; aspect-ratio: 16/9; background: #000; display: block; }
.video-media video, .video-media iframe { width: 100%; height: 100%; display: block; border: none; }
.video-unavailable { height: 100%; display: grid; place-items: center; color: var(--text-dim); font-size: 13px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.card-desc { color: var(--text-dim); font-size: 13px; margin: 0; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.card-date { color: var(--text-faint); font-size: 11px; }

.mod-list { display: flex; flex-direction: column; gap: 12px; }
.mod-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.mod-icon { width: 44px; height: 44px; flex: none; background: var(--panel-2); border: 2px solid var(--border); object-fit: cover; }
.mod-icon.placeholder { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.mod-main { flex: 1; min-width: 0; }
.mod-title-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mod-name { font-weight: 600; font-size: 15px; }
.mod-version { font-family: "VT323", monospace; font-size: 14px; color: var(--amber); }
.mod-loader { font-size: 11px; color: var(--text-faint); border: 1px solid var(--border); padding: 1px 6px; }
.mod-desc { color: var(--text-dim); font-size: 13px; margin: 6px 0 10px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty-state .pixel { font-size: 14px; color: var(--text-dim); margin-bottom: 6px; }

footer.site-footer { text-align: center; color: var(--text-faint); font-size: 12px; padding: 30px 20px; }
.footer-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { color: var(--text-dim); font-size: 12px; text-decoration: none; border-bottom: 1px dotted var(--border-lit); padding-bottom: 1px; }
.footer-links a:hover { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 520px) {
  .status-word { font-size: 22px; }
  .top-inner { padding: 18px 16px 14px; }
  nav.tabs { padding: 0 12px; }
  .wrap { padding: 0 12px 60px; }
}
