/* ══════════════════════════════════════════════════════════════════════
   pso.css — PSO skin for pso.html
   Layered on top of the site's wonder.css. All rules are scoped under
   .pso-page so they never affect the rest of Wonderbit. Load order in
   pso.html is wonder.css first, then this file.
   ══════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════
   PSO SKIN — scoped under .pso-page so it never touches the rest of the
   site. Layered on top of wonder.css: we keep the site's container and
   fonts, and re-dress this one page as a PSO ship terminal.
   ══════════════════════════════════════════════════════════════════════ */
.pso-page {
  --void:        #060a1e;
  --void-2:      #0a1230;
  --panel:       rgba(20, 44, 96, 0.55);
  --panel-solid: #112a5c;
  --edge:        #4fb9d8;
  --edge-bright: #8ef0ff;
  --amber:       #ff9d3c;   /* selection / LIVE, like PSO's highlight bar */
  --online:      #5ef0a0;
  --offline:     #ff5b6e;
  --ink:         #dbe7ff;
  --dim:         #7f97c8;

  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 70% -10%, #14245a 0%, rgba(20,36,90,0) 60%),
    radial-gradient(900px 500px at 10% 110%, #10204e 0%, rgba(16,32,78,0) 55%),
    var(--void);
  background-attachment: fixed;
  font-family: 'EB Garamond', Georgia, serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* faint scanline atmosphere — the Dreamcast HUD tell, kept very quiet */
.pso-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(120,200,255,0.035) 0 1px, transparent 1px 3px);
  z-index: 0;
}
.pso-page > * { position: relative; z-index: 1; }

.pso-wrap { max-width: 940px; margin: 0 auto; padding: 22px 20px 60px; }

/* ── Breadcrumb: keeps this page visibly part of Wonderbit ────────────── */
.pso-crumb {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 26px;
}
.pso-crumb a { color: var(--edge); text-decoration: none; }
.pso-crumb a:hover { color: var(--edge-bright); text-decoration: underline; }
.pso-crumb .sep { opacity: 0.5; margin: 0 0.5ch; }

/* ── Title hero ───────────────────────────────────────────────────────── */
.pso-hero { text-align: center; margin: 6px 0 34px; }
.pso-hero h1 {
  font-family: 'Jersey 15', 'Share Tech Mono', monospace;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 0.95;
  margin: 0;
  color: var(--edge-bright);
  text-shadow: 0 0 18px rgba(120,220,255,0.35), 0 2px 0 #06294a;
  letter-spacing: 0.02em;
}
.pso-hero .sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 10px;
}

/* ── The PSO panel: translucent blue box with cyan corner brackets ─────── */
.pso-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(120,200,255,0.28);
  border-radius: 4px;
  padding: 22px 24px;
  margin: 0 0 26px;
  backdrop-filter: blur(2px);
  box-shadow: inset 0 0 40px rgba(20,60,130,0.35), 0 6px 30px rgba(0,0,0,0.35);
}
/* corner brackets, drawn with two pseudo-elements + gradients */
.pso-panel::before,
.pso-panel::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--edge);
  pointer-events: none;
}
.pso-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.pso-panel::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.pso-panel-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--edge);
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.pso-panel-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(120,200,255,0.5), transparent);
}

/* ── Ship status (per-ship online lights + one total count) ───────────── */
.ship-status {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px 28px; flex-wrap: wrap;
}
.ship-loading {
  font-family: 'Share Tech Mono', monospace; font-size: 0.85rem; color: var(--dim); margin: 0;
}
.ship-indicators { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.ship-ind { display: flex; align-items: center; gap: 13px; }

.ship-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--dim); flex: none;
}
.ship-dot.is-online {
  background: var(--online);
  box-shadow: 0 0 14px 2px rgba(94, 240, 160, 0.7);
  animation: pulse 2.2s ease-in-out infinite;
}
.ship-dot.is-offline { background: var(--offline); box-shadow: 0 0 12px 1px rgba(255, 91, 110, 0.55); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 14px 2px rgba(94, 240, 160, 0.7); }
  50%      { box-shadow: 0 0 20px 5px rgba(94, 240, 160, 0.35); }
}

.ship-name {
  font-family: 'Jersey 15', monospace;
  font-size: 1.7rem; line-height: 1; color: var(--ink);
}

/* the single total: big number + one "online" label */
.ship-total {
  font-family: 'Share Tech Mono', monospace;
  display: flex; align-items: baseline; gap: 8px; margin-left: auto;
}
.ship-total .n {
  font-size: 2.4rem; line-height: 1; color: var(--edge-bright);
  text-shadow: 0 0 14px rgba(120, 220, 255, 0.4);
}
.ship-total .label {
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim);
}

.ship-checked {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem; color: var(--dim); letter-spacing: 0.05em;
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid rgba(120, 200, 255, 0.15);
}

@media (max-width: 560px) {
  .ship-indicators { gap: 18px; }
  .ship-total { margin-left: 0; }
}


/* ── Event schedule ───────────────────────────────────────────────────── */
.events-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.events-col h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 12px;
}
.events-col.past h3 { color: var(--dim); }
.event {
  border-left: 3px solid var(--edge);
  background: rgba(10,22,54,0.5);
  padding: 11px 14px; margin-bottom: 10px; border-radius: 0 3px 3px 0;
}
.event.is-live { border-left-color: var(--amber); background: rgba(60,36,10,0.4); }
.event.is-past { border-left-color: rgba(127,151,200,0.4); opacity: 0.72; }
.event-when {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.04em; color: var(--dim);
  display: flex; align-items: center; gap: 8px;
}
.event-live-tag {
  font-size: 0.64rem; letter-spacing: 0.14em; color: #1a0e00;
  background: var(--amber); padding: 1px 7px; border-radius: 2px; font-weight: 700;
}
.event-name {
  font-family: 'Jersey 15', monospace; font-size: 1.25rem;
  color: var(--ink); margin: 3px 0 2px;
}
.event-summary { font-size: 0.98rem; color: #b9c9ee; line-height: 1.35; }
.events-empty { color: var(--dim); font-family: 'Share Tech Mono', monospace; font-size: 0.85rem; }

/* ── News ─────────────────────────────────────────────────────────────── */
.news-entry { padding: 12px 0; border-bottom: 1px solid rgba(120,200,255,0.12); }
.news-entry:last-child { border-bottom: none; }
.news-date {
  font-family: 'Share Tech Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--edge); text-transform: uppercase;
}
.news-headline {
  font-family: 'Jersey 15', monospace; font-size: 1.4rem;
  color: var(--ink); margin: 4px 0 6px;
}
.news-body { font-size: 1.02rem; line-height: 1.5; color: #c4d3f2; }
.news-empty { color: var(--dim); font-family: 'Share Tech Mono', monospace; font-size: 0.85rem; }

.pso-foot {
  text-align: center; margin-top: 34px;
  font-family: 'Share Tech Mono', monospace; font-size: 0.74rem;
  letter-spacing: 0.08em; color: var(--dim);
}
.pso-foot a { color: var(--edge); text-decoration: none; }
.pso-foot a:hover { color: var(--edge-bright); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ship { grid-template-columns: 1fr; text-align: left; }
  .ship-count { text-align: left; }
  .events-cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ship-dot.is-online { animation: none; }
  .pso-page { background-attachment: scroll; }
}

/* ══════════════════════════════════════════════════════════════════════
   STARFIELD — twinkling background. Density grows with players online:
   a base white field plus one brighter cyan "crew" star per online player.
   Stars are generated by the script in pso.html; these are just the looks.
   ══════════════════════════════════════════════════════════════════════ */
.pso-page > .pso-stars {          /* (0,2,0) beats the generic .pso-page > * */
  position: fixed;
  inset: 0;
  z-index: 0;                     /* above the base gradient, below content */
  pointer-events: none;
  overflow: hidden;
}
.pso-star {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #dfeaff;
  opacity: 0.5;
  will-change: opacity;
  animation: twinkle var(--tw, 3s) ease-in-out var(--td, 0s) infinite;
}
/* crew stars: one per online player — brighter cyan with a soft glow */
.pso-star.crew {
  background: var(--edge-bright);
  box-shadow: 0 0 6px 1px rgba(120, 220, 255, 0.7);
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   HOW TO JOIN — numbered steps + the client download button.
   ══════════════════════════════════════════════════════════════════════ */
.join-lead { font-size: 1.02rem; line-height: 1.5; color: #c4d3f2; margin: 0 0 18px; }

.join-steps { list-style: none; counter-reset: step; margin: 0 0 4px; padding: 0; }
.join-steps li {
  counter-increment: step;
  position: relative;
  padding: 7px 0 7px 42px;
  color: #c4d3f2; line-height: 1.45;
}
.join-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 5px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-family: 'Share Tech Mono', monospace; font-size: 0.85rem;
  color: var(--void); background: var(--edge);
  border-radius: 50%;
}

.join-cta { text-align: center; margin: 24px 0 4px; }
.pso-download {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Jersey 15', monospace; font-size: 1.5rem; letter-spacing: 0.02em;
  color: var(--void);
  background: linear-gradient(180deg, var(--edge-bright), var(--edge));
  border: none; border-radius: 4px;
  padding: 12px 26px; text-decoration: none;
  box-shadow: 0 0 18px rgba(120, 220, 255, 0.4);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}
.pso-download:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(120, 220, 255, 0.6); }
.pso-download .arrow { font-size: 1.05rem; }
.join-meta {
  display: block; margin-top: 10px;
  font-family: 'Share Tech Mono', monospace; font-size: 0.74rem;
  letter-spacing: 0.08em; color: var(--dim);
}
.join-note {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(120, 200, 255, 0.15);
  font-size: 0.95rem; color: #b9c9ee; line-height: 1.45;
}
.join-note code,
.join-steps code {
  font-family: 'Share Tech Mono', monospace; font-size: 0.85em;
  background: rgba(10, 22, 54, 0.7); padding: 1px 6px; border-radius: 3px;
  color: var(--edge-bright);
}

@media (prefers-reduced-motion: reduce) {
  .pso-star { animation: none; opacity: 0.55; }
  .pso-download { transition: none; }
}

/* ── Hardcore ship tag (on the Titan row) ─────────────────────────────── */
.ship-tag.hc {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #1a0406;
  background: var(--offline);
  padding: 2px 7px;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 91, 110, 0.5);
}
