/* DarkOrbit Top — deep space, steel-blue hull panels, cyan edge light,
   amber for the thing you press. Dark by design, like the game. */
:root {
  --void: #03060d;
  --space: #060b16;
  --hull-1: #0f1b2d;
  --hull-2: #0a1322;
  --hull-edge: #1d3350;
  --hull-edge-hi: #2f5a86;
  --text: #d6e4f5;
  --text-dim: #8aa1bd;
  --text-faint: #5d7390;
  --cyan: #48c6ff;
  --cyan-soft: rgba(72, 198, 255, .14);
  --amber: #ffae2b;
  --amber-deep: #e0801a;
  --green: #3ddc84;
  --red: #ff5d5d;
  --gold: #ffd35c;
  --silver: #c9d6e6;
  --bronze: #e39a5f;
  --r: 10px;
  --font-head: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 16px/1.5 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: .02em; text-wrap: balance; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* The sky: nebula washes, two star layers and a planet rim, all CSS. */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(230, 110, 40, .22), transparent 60%),
    radial-gradient(900px 500px at 10% 15%, rgba(60, 90, 200, .18), transparent 65%),
    radial-gradient(700px 400px at 70% 20%, rgba(120, 50, 170, .14), transparent 70%),
    radial-gradient(1px 1px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 120px 80px, #cfe6ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60px 150px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 170px 190px, #9fc9ff 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 230px, #fff 50%, transparent 51%),
    linear-gradient(180deg, var(--space), var(--void));
  background-size: auto, auto, auto, 240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px, auto;
}
.sky::after {
  content: ''; position: absolute; right: -18vw; bottom: -62vw; width: 90vw; height: 90vw; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #3a1c10, #140806 60%, #050202 75%);
  box-shadow: 0 0 120px 20px rgba(255, 120, 40, .18), inset 30px 30px 80px rgba(255, 150, 70, .25);
  opacity: .8;
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(12, 22, 38, .96), rgba(8, 14, 26, .94));
  border-bottom: 1px solid var(--hull-edge);
  box-shadow: 0 1px 0 rgba(72, 198, 255, .12), 0 8px 24px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
}
.top__in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.brand b { display: block; font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .04em; }
.brand small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); }
.nav { display: flex; gap: 4px; }
.nav a { white-space: nowrap; color: var(--text-dim); padding: 8px 12px; border-radius: 6px; font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--cyan-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
.search { margin-left: auto; }
.search input { width: 200px; }
.who { display: flex; gap: 8px; align-items: center; }
.who form { margin: 0; }
.langs { position: relative; }
.langs summary {
  list-style: none; cursor: pointer; padding: 7px 12px; border: 1px solid var(--hull-edge); border-radius: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--text-dim);
}
.langs summary::-webkit-details-marker { display: none; }
.langs__menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; padding: 6px;
  background: var(--hull-2); border: 1px solid var(--hull-edge); border-radius: 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}
.langs__menu a { display: block; padding: 7px 10px; color: var(--text-dim); border-radius: 5px; }
.langs__menu a:hover, .langs__menu a[aria-current] { background: var(--cyan-soft); color: var(--text); text-decoration: none; }

/* Controls */
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search],
input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; background: #050b16; color: var(--text); border: 1px solid var(--hull-edge); border-radius: 6px;
  padding: 9px 11px; font: inherit; font-size: .95rem; min-height: 40px;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px var(--cyan-soft); }
textarea { resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border-radius: 6px; border: 1px solid transparent; cursor: pointer; font: 600 .92rem var(--font-head); letter-spacing: .03em;
  text-decoration: none !important; white-space: nowrap;
}
.btn--primary {
  color: #1b0f00; background: linear-gradient(180deg, #ffc55a, var(--amber) 55%, var(--amber-deep));
  border-color: #ffcf7a; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 4px 16px rgba(255, 174, 43, .25);
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { color: var(--text); background: rgba(72, 198, 255, .06); border-color: var(--hull-edge); }
.btn--ghost:hover { border-color: var(--hull-edge-hi); background: var(--cyan-soft); }
.btn--danger { color: #fff; background: #7a1f24; border-color: #a8363c; }
.btn--block { width: 100%; }
.btn--big { min-height: 48px; font-size: 1.05rem; }

/* Sponsored header banner */
.adbar { position: relative; max-width: 760px; margin: 18px auto 0; padding: 0 16px; }
.adbar img { display: block; width: 100%; height: auto; max-height: 150px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--hull-edge); }
.adbar__tag { position: absolute; right: 24px; top: 6px; font: 600 .65rem var(--font-head); text-transform: uppercase; letter-spacing: .12em;
  background: rgba(0, 0, 0, .65); color: var(--amber); padding: 2px 7px; border-radius: 4px; }

/* Page */
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding-block: 22px 48px; padding-inline: 16px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 14px; }
.list--solo { max-width: 960px; margin: 0 auto; }
.list__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.list__head h1 { margin: 0; }
.list__sub { margin: 0; color: var(--text-dim); font-size: .9rem; }
.countdown { color: var(--amber); font-family: var(--font-head); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-dim); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px; border-radius: var(--r);
  background: rgba(10, 19, 34, .7); border: 1px solid var(--hull-edge); }
.filters label { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); min-width: 140px; flex: 1; }

/* The hull panel every block sits in */
.panel, .card {
  position: relative; border-radius: var(--r);
  background: linear-gradient(180deg, var(--hull-1), var(--hull-2));
  border: 1px solid var(--hull-edge);
  box-shadow: inset 0 1px 0 rgba(120, 190, 255, .10), 0 10px 30px rgba(0, 0, 0, .35);
}
.panel { padding: 18px; }
.panel__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* Server card */
.card { display: grid; grid-template-columns: minmax(56px, max-content) 190px minmax(0, 1fr) 150px; align-items: center; gap: 16px; padding: 14px 16px; }
.card::before { /* the cyan edge light along the top */
  content: ''; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72, 198, 255, .55), transparent);
}
.card:hover { border-color: var(--hull-edge-hi); }
.card__rank { font: 700 1.5rem var(--font-head); color: var(--text-dim); text-align: center; font-variant-numeric: tabular-nums; }
.card--top1 .card__rank { color: var(--gold); text-shadow: 0 0 14px rgba(255, 211, 92, .45); }
.card--top2 .card__rank { color: var(--silver); }
.card--top3 .card__rank { color: var(--bronze); }
.card--top1 { border-color: rgba(255, 211, 92, .45); }
.card--sponsored { border-color: rgba(255, 174, 43, .55); background: linear-gradient(180deg, #1c1a18, #0f1320); }
.card__ad { display: inline-block; font-size: .66rem; letter-spacing: .12em; color: #1b0f00; background: var(--amber); padding: 3px 8px; border-radius: 4px; }
.card__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.card__main { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; min-width: 0; }
.card__title { font-size: 1.02rem; text-align: center; margin: 0; max-width: 100%; overflow-wrap: anywhere; }
.card__banner { width: 100%; max-width: 468px; aspect-ratio: 468 / 180; object-fit: cover; border-radius: 6px; border: 1px solid var(--hull-edge); background: #050b16; }
.card__main:hover .card__banner { border-color: var(--cyan); box-shadow: 0 0 18px rgba(72, 198, 255, .25); }
.card__vote { display: flex; justify-content: center; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font: 700 .7rem var(--font-head);
  text-transform: uppercase; letter-spacing: .1em; border: 1px solid; }
.pill svg { width: 13px; height: 13px; }
.pill--ok { color: var(--green); border-color: rgba(61, 220, 132, .5); background: rgba(61, 220, 132, .1); }
.pill--era { color: var(--cyan); border-color: rgba(72, 198, 255, .45); background: var(--cyan-soft); }
.pill--warn { color: var(--amber); border-color: rgba(255, 174, 43, .5); }
.facts { margin: 0; display: grid; gap: 2px; font-size: .85rem; }
.facts div { display: flex; gap: 6px; }
.facts dt { color: var(--text-faint); }
.facts dd { margin: 0; color: var(--text); font-weight: 600; }
.facts--wide div { justify-content: space-between; padding: 7px 0; border-bottom: 1px solid rgba(29, 51, 80, .6); }
.status { font-size: .78rem; font-weight: 600; }
.status--up { color: var(--green); }
.status--down { color: var(--red); }
.status::before { content: '● '; }

.votebox {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 120px; padding: 12px 8px; border-radius: 8px;
  color: var(--text); text-decoration: none !important;
  background: linear-gradient(180deg, rgba(255, 174, 43, .14), rgba(255, 174, 43, .04));
  border: 1px solid rgba(255, 174, 43, .45);
}
.votebox svg { width: 22px; height: 22px; color: var(--amber); }
.votebox__n { font: 700 1.55rem var(--font-head); font-variant-numeric: tabular-nums; }
.votebox__cta { font: 700 .72rem var(--font-head); text-transform: uppercase; letter-spacing: .14em; color: var(--amber); }
.votebox:hover { border-color: var(--amber); box-shadow: 0 0 22px rgba(255, 174, 43, .25); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.pager a { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px;
  border: 1px solid var(--hull-edge); color: var(--text-dim); font-family: var(--font-head); }
.pager a[aria-current] { color: #1b0f00; background: var(--amber); border-color: var(--amber); }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--hull-edge); border-radius: var(--r); color: var(--text-dim); }

/* Sidebar */
.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.launches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.launches a { display: flex; gap: 10px; align-items: center; padding: 7px; border-radius: 7px; color: var(--text); }
.launches a:hover { background: var(--cyan-soft); text-decoration: none; }
.launches b { font-family: var(--font-head); }
.launches small { display: block; color: var(--text-faint); font-size: .78rem; }
.launches__ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; font: 700 1rem var(--font-head);
  background: linear-gradient(135deg, #1b3a5f, #0c1a2d); border: 1px solid var(--hull-edge-hi); color: var(--cyan); }
.tick { color: var(--green); }
.stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.stats dd { margin: 0; font: 700 1.3rem var(--font-head); font-variant-numeric: tabular-nums; }
.stats--row { grid-template-columns: repeat(4, 1fr); }
.panel--cta { border-color: rgba(255, 174, 43, .4); }
.panel--cta p { color: var(--text-dim); font-size: .92rem; }

/* Server page */
.detail { display: flex; flex-direction: column; gap: 18px; max-width: 1100px; margin: 0 auto; }
.detail__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.detail__head h1 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 4px; }
.detail__title { color: var(--text-dim); margin: 0; }
.crumbs { margin: 0 0 6px; font-size: .85rem; color: var(--text-faint); }
.detail__rank { text-align: center; }
.detail__rankn { display: block; font: 700 2.4rem var(--font-head); color: var(--amber); line-height: 1; }
.detail__banner { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--r); border: 1px solid var(--hull-edge); }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.detail__side { display: flex; flex-direction: column; gap: 16px; }
.votebig { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: var(--r); text-decoration: none !important;
  color: var(--text-dim); background: linear-gradient(180deg, rgba(255, 174, 43, .16), rgba(255, 174, 43, .03)); border: 1px solid rgba(255, 174, 43, .5); }
.votebig__n { font: 700 2.6rem var(--font-head); color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.links { display: grid; gap: 8px; margin-top: 14px; }
.prose { max-width: 70ch; overflow-wrap: anywhere; }
.prose h2 { margin-top: 1.2em; font-size: 1.1rem; }
.comment { padding: 12px 0; border-top: 1px solid rgba(29, 51, 80, .7); }
.comment p { margin: 4px 0; }
.comment__who { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.comment__who time { color: var(--text-faint); margin-left: auto; }
.stars { color: var(--gold); letter-spacing: 2px; }

/* Forms */
.narrow { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.narrow--wide { max-width: 820px; }
.form { display: flex; flex-direction: column; gap: 6px; }
.form label { font-size: .85rem; color: var(--text-dim); margin-top: 8px; }
.form .btn { margin-top: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row--3 { grid-template-columns: repeat(3, 1fr); }
.row label { display: block; }
.checks { border: 1px solid var(--hull-edge); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checks legend { font-size: .85rem; color: var(--text-dim); padding: 0 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text) !important; margin: 0 !important; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }
.hint { margin: 2px 0 0; font-size: .8rem; color: var(--text-faint); }
.err { margin: 2px 0 0; font-size: .82rem; color: var(--red); }
.preview { display: block; max-width: 468px; border-radius: 6px; border: 1px solid var(--hull-edge); }
.adv { margin-top: 12px; border: 1px solid var(--hull-edge); border-radius: 8px; padding: 10px 12px; }
.adv summary { cursor: pointer; color: var(--text-dim); font-family: var(--font-head); }
.danger { display: flex; justify-content: flex-end; }
.code { background: #030810; border: 1px solid var(--hull-edge); border-radius: 6px; padding: 10px 12px; font: .82rem/1.5 ui-monospace, Consolas, monospace;
  color: #bfe6ff; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.code--inline { padding: 2px 6px; display: inline; }
.vote { text-align: center; }
.vote .form { text-align: left; }
.vote__banner { width: 100%; border-radius: 8px; border: 1px solid var(--hull-edge); margin-bottom: 12px; }

.flash { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; border: 1px solid; font-size: .92rem; }
.flash--ok { color: var(--green); border-color: rgba(61, 220, 132, .45); background: rgba(61, 220, 132, .08); }
.flash--error { color: #ffb1b1; border-color: rgba(255, 93, 93, .45); background: rgba(255, 93, 93, .08); }
.flash--info { color: var(--cyan); border-color: rgba(72, 198, 255, .45); background: var(--cyan-soft); }

/* Account + admin */
.mine { display: flex; gap: 16px; align-items: center; }
.mine img { width: 234px; aspect-ratio: 234 / 90; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.mine h2 { font-size: 1.1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mine__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.offer { padding: 16px; border-radius: 8px; border: 1px solid rgba(255, 174, 43, .4); background: rgba(255, 174, 43, .05); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: 8px; border-bottom: 1px solid rgba(29, 51, 80, .7); text-align: left; vertical-align: middle; }
.tbl th { color: var(--text-faint); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.tbl .suspect td { background: rgba(255, 93, 93, .07); }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px; }
.inline select, .inline input { width: auto; min-height: 34px; padding: 4px 8px; }
.inline .num { width: 64px; }
.inline .note { width: 140px; }
.acts { min-width: 420px; }

/* Footer */
.foot { border-top: 1px solid var(--hull-edge); background: rgba(5, 10, 20, .85); }
.foot__in { max-width: 1280px; margin: 0 auto; padding-block: 22px; padding-inline: 16px; color: var(--text-dim); font-size: .88rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot__legal { font-size: .78rem; color: var(--text-faint); max-width: 90ch; }

/* Narrow screens */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .search input { width: 150px; }
}
@media (max-width: 860px) {
  .top__in { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .search { margin-left: auto; }
  .card { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "rank main" "rank meta" "rank vote"; }
  .card__rank { grid-area: rank; align-self: start; font-size: 1.2rem; }
  .card__main { grid-area: main; }
  .card__meta { grid-area: meta; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .card__meta .facts { grid-template-columns: repeat(2, auto); gap: 2px 14px; }
  .card__vote { grid-area: vote; }
  .votebox { flex-direction: row; width: 100%; justify-content: center; gap: 10px; }
  .detail__grid, .row, .row--3, .offers { grid-template-columns: 1fr; }
  .detail__head { flex-direction: column; }
  .mine { flex-direction: column; align-items: stretch; }
  .mine img { width: 100%; }
  .stats--row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .brand small, .search { display: none; }
  .who .btn { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
