@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600&family=Share+Tech+Mono&display=swap");

:root {
  --bg: #0b0f1f;
  --bg-glow: #162a52;
  --panel: #f7f7fb;
  --panel-dark: #e1e4f2;
  --ink: #10131f;
  --muted: #4f5575;
  --accent: #0ea5e9;
  --accent-strong: #005c9e;
  --accent-warm: #fbbf24;
  --border: #2d2f45;
  --shadow: rgba(5, 10, 25, 0.45);
  --bevel-light: #ffffff;
  --bevel-dark: #b7bdd6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Share Tech Mono", "Courier New", monospace;
  color: var(--ink);
  line-height: 1.6;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.15), transparent 50%),
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.12), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, #121931 60%, #0a0c18 100%);
}

body a {
  color: var(--accent-strong);
  text-decoration: none;
}

body a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: screen;
  opacity: 0.35;
}

.screen {
  max-width: 1100px;
  margin: 32px auto 64px;
  padding: 0 16px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(90deg, #182548, #1d3a77);
  border: 2px solid #0c1430;
  box-shadow: 0 10px 24px var(--shadow);
}

.brand {
  display: grid;
  gap: 4px;
}

.logo {
  font-family: "Orbitron", sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  color: #f8fafc;
  text-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

.tagline {
  font-size: 12px;
  text-transform: uppercase;
  color: #cbd5f5;
  letter-spacing: 1px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #0c122b;
  border: 2px inset #212c50;
  color: #d1fae5;
  text-transform: uppercase;
  font-size: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: #0c122b;
  border: 2px solid #10162f;
  border-top: none;
  align-items: center;
}

.nav a {
  color: #e0f2fe;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 4px 8px;
  border: 1px solid transparent;
}

.nav a:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  text-decoration: none;
}

.realm-switch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.realm-switch span {
  color: #94a3b8;
}

.realm-link {
  text-decoration: none;
  color: #e0f2fe;
  padding: 3px 6px;
  border: 1px solid #1e2a4f;
  background: #0f172a;
}

.realm-link.active {
  color: #041126;
  background: #38bdf8;
  border-color: #38bdf8;
}

.ticker {
  margin-top: 12px;
  overflow: hidden;
  border: 2px solid #10162f;
  background: #0c1224;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
}

.ticker-track {
  display: flex;
  gap: 40px;
  padding: 6px 0;
  animation: ticker 22s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes boot {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-pop {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stack {
  display: grid;
  gap: 20px;
}

.layout.single {
  grid-template-columns: minmax(0, 1fr);
}

.window {
  background: var(--panel);
  border: 2px solid var(--border);
  box-shadow: 6px 6px 0 var(--bevel-dark), -2px -2px 0 var(--bevel-light);
  animation: boot 0.6s ease-out both;
  transform-origin: top;
}

.window-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  color: #051328;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
}

.window-controls {
  font-size: 10px;
}

.window-body {
  padding: 16px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-dark) 100%);
  color: var(--ink);
}

.hero {
  font-size: 32px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.grid-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.panel {
  padding: 12px;
  border: 2px inset #c6cbe2;
  background: #fefefe;
  font-size: 13px;
}

.grid-panels .panel,
.account-grid .panel {
  animation: panel-pop 0.5s ease-out both;
}

.grid-panels .panel:nth-child(1),
.account-grid .panel:nth-child(1) {
  animation-delay: 0.05s;
}

.grid-panels .panel:nth-child(2),
.account-grid .panel:nth-child(2) {
  animation-delay: 0.12s;
}

.grid-panels .panel:nth-child(3),
.account-grid .panel:nth-child(3) {
  animation-delay: 0.2s;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.form.compact {
  margin-top: 0;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

input,
select,
textarea {
  padding: 10px 12px;
  border: 2px inset #c1c7de;
  background: #fefefe;
  font-size: 14px;
  font-family: "Share Tech Mono", monospace;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px solid #0c122b;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  cursor: pointer;
  font-family: "Share Tech Mono", monospace;
}

.btn.primary {
  background: linear-gradient(180deg, #fbbf24, #f97316);
  color: #1f0a00;
  box-shadow: inset -2px -2px 0 #b45309, inset 2px 2px 0 #fde68a;
}

.btn.ghost {
  background: #0c122b;
  color: #e0f2fe;
  box-shadow: inset -2px -2px 0 #1f2a52, inset 2px 2px 0 #2b3d78;
}

.btn:hover {
  transform: translateY(-1px);
}

.sidebar {
  display: grid;
  gap: 18px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #c6cbe2;
  padding-bottom: 6px;
}

.badge {
  margin-top: 12px;
  background: #0f172a;
  color: #f8fafc;
  padding: 6px 10px;
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-banner {
  margin-top: 10px;
  padding: 8px 10px;
  border: 2px dashed #0f172a;
  background: #fef3c7;
  color: #7c2d12;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.news p {
  margin: 0 0 10px;
  font-size: 13px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.link-btn {
  text-decoration: none;
  text-align: center;
  padding: 8px;
  background: #1e293b;
  color: #e2e8f0;
  border: 2px outset #495579;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scoreboard {
  margin-top: 16px;
  border: 2px inset #c1c7de;
  background: #fefefe;
  overflow-x: auto;
}

.score-row {
  display: grid;
  grid-template-columns: 60px 1.4fr 1fr 70px 1.6fr 90px 90px 90px 80px 70px;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #e5e7f1;
  min-width: 920px;
}

.score-row a {
  color: #0f172a;
  text-decoration: none;
}

.score-row a:hover {
  color: #0ea5e9;
  text-decoration: underline;
}

.score-row span {
  white-space: nowrap;
}

.score-stats {
  font-family: "Courier New", monospace;
  letter-spacing: 0.5px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-card {
  border: 2px inset #c1c7de;
  background: #fefefe;
  padding: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: grid;
  gap: 6px;
}

.stat-card.compact {
  padding: 8px;
}

.stat-card strong {
  font-size: 18px;
  color: #0f172a;
}

.stat-card em {
  font-style: normal;
  color: #64748b;
  font-size: 11px;
}

.log-list {
  margin-top: 16px;
  border: 2px inset #c1c7de;
  background: #fefefe;
}

.log-row {
  display: grid;
  grid-template-columns: 160px 180px 1fr;
  gap: 12px;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #e5e7f1;
}

.log-row.head {
  background: #0ea5e9;
  color: #041126;
  text-transform: uppercase;
  font-weight: 600;
}

.action-table {
  margin-top: 16px;
  border: 2px inset #c1c7de;
  background: #fefefe;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #e5e7f1;
}

.action-row.head {
  background: #0ea5e9;
  color: #041126;
  text-transform: uppercase;
  font-weight: 600;
}

.action-row span {
  white-space: nowrap;
}

.score-row.head {
  background: #0ea5e9;
  color: #041126;
  text-transform: uppercase;
  font-weight: 600;
}

.score-row:not(.head):nth-child(even) {
  background: #eef1fb;
}

.notice {
  padding: 10px 12px;
  border: 2px solid #0c122b;
  margin-top: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.notice.success {
  background: #dcfce7;
  color: #166534;
}

.notice.error {
  background: #fee2e2;
  color: #991b1b;
}

.account-grid {
  display: grid;
  gap: 16px;
}

.forum-list {
  margin-top: 12px;
  border: 2px inset #c1c7de;
  background: #fefefe;
}

.forum-row {
  display: grid;
  grid-template-columns: 1fr 120px 160px;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7f1;
  font-size: 13px;
}

.forum-row.threads {
  grid-template-columns: 1fr 140px 100px 160px;
}

.forum-row.head {
  background: #0ea5e9;
  color: #041126;
  text-transform: uppercase;
  font-weight: 600;
}

.forum-row:not(.head):nth-child(even) {
  background: #eef1fb;
}

.forum-row.head.threads {
  grid-template-columns: 1fr 140px 100px 160px;
}

.forum-title a {
  color: #0f172a;
  text-decoration: none;
}

.posts {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.post {
  padding: 12px;
  border: 2px inset #c1c7de;
  background: #fefefe;
}

.post header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.post-author {
  color: #0f172a;
}

.post-time {
  color: #6b7280;
}

.notice.info {
  background: #dbeafe;
  color: #1e3a8a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.talk-html,
.talk-body {
  height: 100%;
}

.talk-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.talk-card {
  display: flex;
  flex-direction: column;
  height: 440px;
}

.talk-window {
  padding: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
}

.talk-body {
  background: transparent;
  color: #0b0f1a;
  margin: 0;
}

.talk-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  height: 100%;
  min-height: 100%;
  padding: 8px;
}

.talk-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border: 2px inset #c1c7de;
  background: #f3f6ff;
  color: #475569;
  text-align: center;
}

.talk-status.ok {
  color: #0f172a;
  background: #dbeafe;
}

.talk-status.down {
  color: #7f1d1d;
  background: #fee2e2;
}

.talk-messages {
  border: 2px inset #c1c7de;
  background: #f3f6ff;
  padding: 10px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  font-size: 12px;
  min-height: 0;
}

.talk-message {
  background: #ffffff;
  border: 1px solid #d9dfef;
  padding: 6px 8px;
  box-shadow: inset 0 0 0 1px #eef2ff;
}

.talk-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin-bottom: 4px;
}

.talk-user {
  font-weight: 600;
}

.talk-body-text {
  color: #111827;
  line-height: 1.3;
}

.talk-empty {
  text-align: center;
  color: #64748b;
  padding: 24px 10px;
}

.talk-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.talk-field input {
  width: 100%;
  border: 2px inset #c1c7de;
  padding: 8px 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  background: #fff;
}

.talk-login {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #475569;
  border: 2px inset #c1c7de;
  padding: 8px 10px;
  background: #f3f6ff;
}

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

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .grid-panels {
    grid-template-columns: 1fr;
  }

  .forum-row,
  .forum-row.threads,
  .forum-row.head.threads {
    grid-template-columns: 1fr;
  }

  .log-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .link-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }
}
