:root {
  --bg: #06070b;
  --text: #e8e9ff;
  --muted: #a8aac8;
  --glass: rgba(255,255,255,.07);
  --stroke: rgba(255,255,255,.12);
  --accent: #9b8cff;
  --accent-soft: rgba(155,140,255,.35);
  --shadow: 0 25px 70px rgba(0,0,0,.55);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

/* === BACKGROUND IMAGE (NO PSEUDO-ELEMENTS) === */
.bg {
  position: fixed;
  inset: 0;
  background: url("/images/liminal.jpg") center / cover no-repeat;
  filter: blur(2px) brightness(0.55);
  transform: scale(1.05);
}

/* === SUBTLE DARK OVERLAY === */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
}

/* === GRAIN === */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

main {
  height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

/* === CARD === */
.card {
  width: min(900px, 100%);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.10),
    rgba(255,255,255,.04)
  );
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  position: relative;
}

/* === TOP BAR === */
.top {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand {
  font-family: ui-monospace, monospace;
}

/* === LANGUAGE SWITCH === */
.lang {
  display: flex;
  gap: 10px;
  font-family: ui-monospace, monospace;
}

.lang button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  letter-spacing: .1em;
}

.lang button.active {
  color: var(--text);
}

/* === CONTENT === */
.content {
  padding: clamp(28px, 4.5vw, 52px);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.glow {
  text-shadow: 0 0 22px var(--accent-soft);
}

p {
  margin: 0;
  max-width: 70ch;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: rgba(232,233,255,.8);
}

.divider {
  margin: 28px 0 18px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.25),
    transparent
  );
}

/* === CTA === */
.cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

a.button,
button.button {
  text-decoration: none;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  transition: all .2s ease;
  font-family: ui-monospace, monospace;
  cursor: pointer;
}

a.button:hover,
button.button:hover {
  border-color: var(--accent);
  background: rgba(155,140,255,.15);
}

/* === HINT === */
.hint {
  font-size: 12px;
  color: var(--muted);
}

/* === FOOTER === */
.footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* === LANGUAGE BLOCKS === */
.lang-block {
  display: none;
}

.lang-block.active {
  display: block;
}

/* === SERVERS PAGE === */
.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .1em;
}

.servers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.server {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: ui-monospace, monospace;
  transition: all .3s ease;
}

.server .name {
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--muted);
}

.server .status {
  font-size: 12px;
  color: var(--muted);
}

.server.ok {
  border-color: var(--accent);
  background: rgba(155,140,255,.12);
}

.server.ok .status {
  color: var(--text);
}

.server.fail {
  border-color: rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
}

.server.fail .status {
  color: rgba(255,255,255,.5);
}

@media (max-width: 520px) {
  .top,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
