:root {
  --bg: #0a111f;
  --panel: #101a2d;
  --panel-soft: #12203a;
  --text: #e6edf8;
  --muted: #9eb0cf;
  --line: #263b5d;
  --accent: #58f6d2;
  --accent-2: #5ea0ff;
  --danger: #ff6d82;
  --ok: #7dfa6b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@font-face {
  font-family: "Monocraft";
  src: url("./Monocraft-ttf/Monocraft.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Monocraft";
  src: url("./Monocraft-ttf/weights/Monocraft-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Monocraft", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #16365a, transparent 40%),
    radial-gradient(circle at 90% 20%, #201749, transparent 45%),
    linear-gradient(180deg, #07101f, #050a14);
  line-height: 1.5;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 95%);
  pointer-events: none;
}

.shell {
  width: min(1100px, 92vw);
  margin: 28px auto 56px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.panel {
  background: linear-gradient(145deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(4px);
  animation: lift 450ms ease both;
}

.hero {
  grid-column: 1 / -1;
}

.notice-banner {
  grid-column: 1 / -1;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(94, 160, 255, 0.22), rgba(88, 246, 210, 0.2));
  border-color: #3f5f93;
  font-size: 0.9rem;
}

#status,
#events,
#playground,
#chat,
#guestbook,
#counter,
#now {
  grid-column: span 6;
}

#now {
  grid-column: 1 / -1;
}

.eyebrow {
  font-family: "Monocraft", "VT323", monospace;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 6px 0 8px;
  line-height: 1.05;
}

.subtitle {
  max-width: 64ch;
  color: var(--muted);
  margin-top: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #03101f;
  font-weight: 700;
  border: none;
}

.btn-ghost:hover,
.tile:hover {
  border-color: var(--accent);
}

.server-grid {
  display: grid;
  gap: 8px;
}

.mock-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.server-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.18);
}

.player-count {
  font-family: "Monocraft", "VT323", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.is-online {
  background: var(--ok);
}

.is-degraded {
  background: #ffd666;
}

.is-offline {
  background: var(--danger);
}

.events-list,
.chat-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.events-list li,
.chat-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
}

.chat-user {
  font-family: "Monocraft", "VT323", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.event-time {
  font-family: "Monocraft", "VT323", monospace;
  color: var(--accent);
  font-size: 1.15rem;
}

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

.tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  padding: 16px;
  font-weight: 500;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent);
}

.now-text {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.counter-content {
  min-height: 64px;
  display: grid;
  align-items: center;
  gap: 8px;
}

.counter-placeholder {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.12);
}

.counter-badge {
  display: inline-flex;
  text-decoration: none;
}

.counter-error {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.12);
}

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

@media (max-width: 900px) {
  #status,
  #events,
  #playground,
  #chat,
  #guestbook,
  #counter,
  #now {
    grid-column: 1 / -1;
  }

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