/* sven.thiccbadgerbaddies.live — Sven Co-op status page
   ----------------------------------------------------- */

:root {
  --ink-0: #0a0807;
  --ink-1: #110e0a;
  --ink-2: #181410;
  --ink-3: #221b14;
  --line:  #2c2117;

  /* SC-leaning orange, but pulled back from full saturation */
  --sc-0: #f0c388;     /* hi-light */
  --sc-1: #d99544;     /* primary  */
  --sc-2: #c2782a;     /* signal   */
  --sc-3: #8a571a;     /* dim      */
  --sc-4: #4a2e0d;     /* shadow   */

  /* category accents — kept distinct but desaturated so the column reads calm */
  --c-horror:   #a85a4a;
  --c-campaign: #b88550;
  --c-escape:   #b89a4a;
  --c-story:    #aa7a4a;
  --c-training: #6a9aa8;
  --c-co-op:    #80a06a;
  --c-payload:  #b89a5a;
  --c-ctf:      #6a9aa8;
  --c-cs-port:  #8a7a64;
  --c-bot:      #8a7a64;
  --c-event:    #9a7aa0;
  --c-ragemap:  #9a7aa0;
  --c-th:       #a06a5a;
  --c-official: #b8a07a;
  --c-jp:       #b88a98;
  --c-alien:    #7aa07a;
  --c-mission:  #756650;

  --green:   #8cd97a;
  --red:     #e0633e;
  --muted:   #7a6a55;

  --f-display: "Departure Mono", ui-monospace, monospace;
  --f-body:    "B612 Mono", "Departure Mono", ui-monospace, monospace;

  --gap: clamp(12px, 1.2vw, 20px);
  --pad: clamp(14px, 1.4vw, 22px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--ink-0);
  color: var(--sc-1);
  font-family: var(--f-body);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

a {
  color: var(--sc-0);
  text-decoration: none;
  border-bottom: 1px dotted var(--sc-3);
}
a:hover { border-bottom-color: var(--sc-0); }
.lnk { border-bottom: 1px dotted var(--sc-3); }

h1, h2, h3 { margin: 0; font-weight: 400; }

.muted { color: var(--muted); }
.small { font-size: 11px; }

::selection { background: var(--sc-2); color: var(--ink-0); }
:focus-visible { outline: 1px dashed var(--sc-1); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .scanlines { display: none; }
  * { transition: none !important; animation: none !important; }
}

/* --- subtle scanline texture --- */
.scanlines {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(255,154,40,0.025) 2px 3px
  );
}

/* --- layout --- */
.frame {
  min-height: 100vh;
  padding: var(--pad);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--gap);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--ink-1);
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.bar__cluster { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar__cluster--right { justify-content: flex-end; flex-wrap: wrap; }
.bar__sep   { color: var(--sc-4); }
.bar__host  { color: var(--sc-0); }

.wordmark { color: var(--sc-0); }

/* status dot */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot--online  { background: var(--green); box-shadow: 0 0 4px var(--green); }
.dot--offline { background: var(--red);   box-shadow: 0 0 4px var(--red); }

/* --- grid --- */
.grid {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  gap: var(--gap);
  min-height: 0;
}
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .panel:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}

/* --- panels --- */
.panel {
  background: var(--ink-1);
  border: 1px solid var(--line);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 12px; min-height: 0;
}
.panel__title {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.panel__subtitle {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* --- vitals --- */
.vitals { margin: 0; padding: 0; display: grid; gap: 12px; }
.vital  { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; align-items: baseline; }
.vital dt {
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.vital dd {
  margin: 0;
  text-align: right;
  font-family: var(--f-display);
  color: var(--sc-0);
}
.vital strong { font-weight: 400; }
.vital__bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--ink-3);
  overflow: hidden;
}
.vital__bar-fill {
  height: 100%; width: calc(var(--pct, 0) * 100%);
  background: var(--sc-2);
  transition: width 600ms ease;
}

/* --- now playing --- */
.now { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.now__map {
  font-family: var(--f-display);
  font-size: clamp(22px, 3.4vw, 40px);
  color: var(--sc-0);
  letter-spacing: 0.02em;
  word-break: break-word;
}
.now__sub { margin: 0; font-size: 11px; }

.connect {
  margin-top: 6px;
  display: inline-block;
  padding: 7px 12px;
  font-family: var(--f-display);
  font-size: 12px;
  color: var(--sc-0);
  background: transparent;
  border: 1px solid var(--sc-3);
  border-radius: 1px;
}
.connect:hover { color: var(--ink-0); background: var(--sc-1); border-color: var(--sc-1); }

/* --- roster --- */
.roster {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 4px 12px;
  max-height: 220px;
  overflow-y: auto;
}
.roster li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 6px;
  align-items: baseline;
  padding: 3px 0;
  font-size: 12px;
  color: var(--sc-1);
}
.roster li.muted { display: block; }   /* empty-state opt-out of the grid */
.roster__rank  { font-family: var(--f-display); font-size: 10px; color: var(--muted); }
.roster__name  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster__score { font-family: var(--f-display); font-size: 11px; color: var(--muted); }

/* --- cycle --- */
.cycle {
  list-style: none; margin: 0; padding: 0;
  max-height: 60vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.cycle::-webkit-scrollbar { width: 5px; }
.cycle::-webkit-scrollbar-track { background: var(--ink-2); }
.cycle::-webkit-scrollbar-thumb { background: var(--sc-4); }

.cycle__item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  padding: 4px 6px;
  border-left: 2px solid transparent;
  font-family: var(--f-display);
  font-size: 12px;
  color: var(--sc-1);
  align-items: center;
}
.cycle__item:hover { background: var(--ink-2); }
.cycle__idx  { color: var(--muted); font-size: 10px; text-align: right; }
.cycle__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cycle__tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  color: var(--c-mission);
  white-space: nowrap;
}
/* Per-category chip colors. Defaults to --c-mission via the rule above. */
.cycle__item[data-tag="horror"]   .cycle__tag { color: var(--c-horror); }
.cycle__item[data-tag="campaign"] .cycle__tag { color: var(--c-campaign); }
.cycle__item[data-tag="escape"]   .cycle__tag { color: var(--c-escape); }
.cycle__item[data-tag="story"]    .cycle__tag { color: var(--c-story); }
.cycle__item[data-tag="training"] .cycle__tag { color: var(--c-training); }
.cycle__item[data-tag="co-op"]    .cycle__tag { color: var(--c-co-op); }
.cycle__item[data-tag="payload"]  .cycle__tag { color: var(--c-payload); }
.cycle__item[data-tag="ctf"]      .cycle__tag { color: var(--c-ctf); }
.cycle__item[data-tag="cs-port"]  .cycle__tag { color: var(--c-cs-port); }
.cycle__item[data-tag="bot"]      .cycle__tag { color: var(--c-bot); }
.cycle__item[data-tag="event"]    .cycle__tag { color: var(--c-event); }
.cycle__item[data-tag="ragemap"]  .cycle__tag { color: var(--c-ragemap); }
.cycle__item[data-tag="th"]       .cycle__tag { color: var(--c-th); }
.cycle__item[data-tag="official"] .cycle__tag { color: var(--c-official); }
.cycle__item[data-tag="jp---co-op"] .cycle__tag { color: var(--c-jp); }
.cycle__item[data-tag="alien"]    .cycle__tag { color: var(--c-alien); }

.cycle__item--now {
  border-left-color: var(--sc-2);
  background: var(--ink-2);
}
.cycle__item--now .cycle__name { color: var(--sc-0); }

/* --- narrow viewport tweaks --- */
@media (max-width: 700px) {
  .bar { flex-wrap: wrap; padding: 8px 10px; }
  .bar__host { display: none; }
  .roster  { max-height: 180px; }
  .cycle   { max-height: 50vh; }
  .wordmark__txt { font-size: 12px; }
}
