/* Colors, type, and logo treatment match https://refreshgaming.net. */

:root {
  color-scheme: dark;
  --bg: #080C15;
  --bg-end: #0a1020;
  --bg-raised: rgba(8, 12, 21, 0.78);
  --bg-sunken: #060910;
  --line: rgba(0, 168, 235, 0.28);
  --text: #ffffff;
  --muted: #a0aec0;
  --accent: #00A8EB;
  --accent-hover: #33b9f5;
  --accent-ink: #080C15;
  --danger: #ff8b78;
  --warn: #f0c36a;
  --ok: #7ddea2;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #080C15 0%, #0a1020 100%);
  color: #ffffff;
}

a {
  color: #00A8EB;
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  color: #33b9f5;
}

h1, h2, h3 { line-height: 1.15; font-weight: 600; }
h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 20px;
  color: #00A8EB;
  font-weight: 700;
  text-shadow: 0 0 30px rgba(0, 168, 235, 0.3);
}
h2 { margin: 0 0 0.75rem; font-size: 1.25rem; color: #ffffff; }
p { margin: 0 0 0.75rem; }

.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: #00A8EB;
  color: #080C15;
  padding: 0.4rem 0.7rem;
  z-index: 3;
}
.skip:focus { top: 0.5rem; color: #080C15; }

.background-decoration {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.1;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #00A8EB;
}

.circle1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
  animation: rotate 20s linear infinite;
}

.circle2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -50px;
  animation: rotate 15s linear infinite reverse;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes glow {
  from { text-shadow: 0 0 20px rgba(0, 168, 235, 0.3); }
  to { text-shadow: 0 0 30px rgba(0, 168, 235, 0.6); }
}

.site-header,
.dev-banner,
.banner,
.content,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 168, 235, 0.22);
  background: rgba(8, 12, 21, 0.88);
  position: sticky;
  top: 0;
  z-index: 2;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}
.wordmark:hover { color: #33b9f5; }
.wordmark img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(0, 168, 235, 0.5));
}

.nav, .account { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.nav { margin-right: auto; }
.nav a { color: #ffffff; font-size: 0.95rem; }
.nav a:hover {
  color: #33b9f5;
  text-shadow: 0 0 10px rgba(0, 168, 235, 0.3);
}
.who { color: #a0aec0; font-size: 0.92rem; }

.dev-banner {
  margin: 0;
  padding: 0.45rem 1.5rem;
  background: rgba(0, 168, 235, 0.08);
  color: #a0aec0;
  border-bottom: 1px solid rgba(0, 168, 235, 0.22);
  font-size: 0.92rem;
}

.content { width: min(1100px, calc(100% - 2rem)); margin: 0 auto 3rem; }

.teaser-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.teaser-frame {
  display: block;
  width: min(100%, calc((100vh - 2rem) * 16 / 9));
  max-height: calc(100vh - 2rem);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #060910;
}
.site-footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: #a0aec0;
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: center;
}

.hero {
  padding: 40px 0 1rem;
  text-align: center;
  animation: fadeIn 1s ease-in;
}

.brand-logo {
  width: 125px;
  height: 125px;
  margin: 0 auto 30px;
  animation: float 3s ease-in-out infinite;
  user-select: none;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(0, 168, 235, 0.5));
}

.hero h1 { animation: glow 2s ease-in-out infinite alternate; }

.divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00A8EB, transparent);
  margin: 30px auto;
}

.kicker {
  margin: 0 0 0.4rem;
  color: #00A8EB;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
}
.lede {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  color: #a0aec0;
  font-size: 1.1rem;
  line-height: 1.8;
}
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-actions { justify-content: center; }
.page-head { margin: 2rem 0 1.25rem; text-align: center; }
.page-head p:last-child { color: #a0aec0; max-width: 650px; margin-left: auto; margin-right: auto; font-size: 1.1rem; line-height: 1.8; }
.page-head h1 { margin-bottom: 0; }
.page-head h1 + p,
.page-head .meta { margin-top: 0.75rem; }

.discord-link {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.35rem;
}
.discord-link a {
  color: #00A8EB;
  text-shadow: 0 0 10px rgba(0, 168, 235, 0.3);
}
.discord-link a:hover {
  color: #33b9f5;
  text-shadow: 0 0 20px rgba(0, 168, 235, 0.6);
}

.button, button, .account a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00A8EB;
  color: #080C15;
  border: 1px solid #00A8EB;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.button:hover, button:hover { background: #33b9f5; border-color: #33b9f5; color: #080C15; }
.button-quiet, button.quiet, a.button-quiet {
  background: transparent;
  color: #00A8EB;
  border-color: #00A8EB;
}
.button-quiet:hover, button.quiet:hover, a.button-quiet:hover {
  background: transparent;
  color: #33b9f5;
  border-color: #33b9f5;
}
button.danger { background: transparent; color: #ff8b78; border-color: #ff8b78; }
button.danger:hover { background: transparent; color: #ffb0a4; border-color: #ffb0a4; }

.panel {
  background: rgba(8, 12, 21, 0.78);
  border: 1px solid rgba(0, 168, 235, 0.22);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}
.panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }

.meta { display: block; color: #a0aec0; font-size: 0.85rem; }
.banner { padding: 0.8rem 1rem; border-radius: 8px; margin: 1rem 0; }
.banner-error { background: rgba(80, 20, 24, 0.92); color: #ffd2cb; border: 1px solid rgba(255, 139, 120, 0.35); }
.banner-ok { background: rgba(8, 40, 32, 0.92); color: #b6f0d0; border: 1px solid rgba(0, 168, 235, 0.25); }
.banner .meta { color: inherit; opacity: 0.85; }

.table-wrap { overflow-x: auto; border: 1px solid rgba(0, 168, 235, 0.22); border-radius: 16px; }
table.servers { width: 100%; border-collapse: collapse; background: rgba(8, 12, 21, 0.78); }
table.servers th, table.servers td { text-align: left; padding: 0.75rem 0.9rem; vertical-align: top; border-bottom: 1px solid rgba(0, 168, 235, 0.16); }
table.servers thead th { color: #a0aec0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.server-name { display: block; font-size: 1rem; color: #ffffff; }

.pill {
  display: inline-block;
  border: 1px solid rgba(0, 168, 235, 0.28);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.8rem;
}
.pill-ok { color: #7ddea2; border-color: rgba(125, 222, 162, 0.45); }
.pill-warn { color: #f0c36a; border-color: rgba(240, 195, 106, 0.45); }
.pill-off { color: #a0aec0; }
.pill-update { color: #b388ff; border-color: rgba(179, 136, 255, 0.45); }

.claim-list { display: flex; gap: 0.4rem; padding: 0; list-style: none; flex-wrap: wrap; }
.claim-list li { border: 1px solid rgba(0, 168, 235, 0.28); border-radius: 999px; padding: 0.1rem 0.55rem; color: #a0aec0; }

.console-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; }
.node-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.node-list li, .console-server {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 168, 235, 0.16);
}
.console-server { flex-wrap: wrap; }
.deploy { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.steps { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0.5rem 0 0; flex-wrap: wrap; }
.steps li {
  border: 1px solid rgba(0, 168, 235, 0.28);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  color: #a0aec0;
}
.steps li[data-state="current"] { color: #080C15; background: #00A8EB; border-color: #00A8EB; }
.steps li[data-state="done"] { color: #7ddea2; border-color: rgba(125, 222, 162, 0.45); }
label { display: grid; gap: 0.3rem; color: #a0aec0; font-size: 0.9rem; }
input, select {
  background: #060910;
  color: #ffffff;
  border: 1px solid rgba(0, 168, 235, 0.28);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  min-width: 12rem;
}

#blazor-error-ui {
  background: rgba(80, 20, 24, 0.96);
  color: #ffd2cb;
  bottom: 0;
  display: none;
  left: 0;
  padding: 0.6rem 1rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui.show { display: block; }
#blazor-error-ui .dismiss { margin-left: 0.5rem; }

#components-reconnect-modal {
  border: 1px solid rgba(0, 168, 235, 0.28);
  border-radius: 16px;
  background: #0a1020;
  color: #ffffff;
  padding: 1.25rem;
}
#components-reconnect-modal::backdrop { background: rgba(0, 0, 0, 0.6); }
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible { display: none; }
.components-reconnect-show .components-reconnect-first-attempt-visible { display: block; }

:focus-visible { outline: 2px solid #00A8EB; outline-offset: 2px; }

@media (max-width: 800px) {
  .console-grid { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; }
  .node-list li, .console-server { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .content, .site-footer { width: min(1100px, calc(100% - 1.5rem)); }
  .hero { padding-top: 24px; }
}

.admin-subnav, .section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.25rem 0;
}
.admin-subnav a, .section-tabs a { color: #ffffff; font-weight: 700; }
.admin-subnav a[aria-current="page"] { color: #00A8EB; }

.status-lamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.5rem;
}
.status-lamp-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #e23b3b;
  flex: none;
}
.status-lamp[data-state="online"] .status-lamp-dot { background: #3ddc84; }
.status-lamp[data-state="starting"] .status-lamp-dot { background: #f5a524; }
.status-lamp[data-state="updating"] .status-lamp-dot { background: #b388ff; }
.status-lamp[data-state="online"] .status-lamp-dot,
.status-lamp[data-state="starting"] .status-lamp-dot,
.status-lamp[data-state="updating"] .status-lamp-dot {
  animation: status-pulse 1.6s ease-out infinite;
}
@keyframes status-pulse {
  0% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.45); opacity: 0.45; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .status-lamp-dot { animation: none; }
}

.console-log {
  background: #060910;
  border: 1px solid rgba(0, 168, 235, 0.28);
  border-radius: 8px;
  min-height: 8rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 0.85rem;
}
.console-log p { margin: 0; color: #a0aec0; }
.console-line {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.console-pause { display: none; color: #a0aec0; font-size: 0.85rem; margin: 0 0 0.75rem; }
.console-reconnect { margin-left: 0.75rem; }
button.console-reconnect:disabled,
button.console-reconnect:disabled:hover {
  opacity: 0.45;
  cursor: default;
  background: transparent;
  color: #00A8EB;
  border-color: #00A8EB;
}
.console-log[data-paused="true"] + .console-pause { display: block; }
.console-command { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.console-command input { flex: 1; min-width: min(100%, 24rem); }
.claim-list form { display: inline; }
