:root {
  --bg: #0b0d13;
  --bg-deep: #070910;
  --surface: #161616;
  --surface-elevated: #1a1d26;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f6f7fb;
  --muted: rgba(255, 255, 255, 0.68);
  --muted-soft: rgba(255, 255, 255, 0.52);
  --accent: #304f9e;
  --accent-strong: #4d72d5;
  --accent-soft: rgba(48, 79, 158, 0.2);
  --success: #25c487;
  --warning: #f0b85a;
  --danger: #e05765;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(48, 79, 158, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 35%, #090b11);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 620px;
  padding: 1rem;
  overflow: hidden;
}

.hero-bg,
.hero-shade,
.hero-particles {
  position: absolute;
  inset: 0;
}

.hero-bg {
  z-index: 0;
  background-image: url("/uploads/simple-space-wallpaper-3840x2160-celestial-universe-26284.jpg");
  background-size: cover;
  background-position: center top;
  filter: saturate(0.95) brightness(0.9);
  transform: scale(1.02);
}

.hero-shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.18) 0%, rgba(7, 9, 16, 0.46) 54%, rgba(11, 13, 19, 0.98) 100%),
    radial-gradient(circle at 72% 25%, rgba(48, 79, 158, 0.28), transparent 26rem),
    radial-gradient(circle at 18% 16%, rgba(255, 134, 105, 0.13), transparent 23rem);
}

.hero-particles {
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: var(--particle-size);
  height: var(--particle-size);
  left: var(--particle-x);
  top: var(--particle-y);
  border-radius: 999px;
  background: rgba(255, 255, 255, var(--particle-opacity));
  box-shadow:
    0 0 calc(var(--particle-size) * 2.6) rgba(255, 255, 255, calc(var(--particle-opacity) * 0.82)),
    0 0 calc(var(--particle-size) * 5.2) rgba(255, 255, 255, calc(var(--particle-opacity) * 0.22));
  filter: blur(var(--particle-blur));
  transform: translate3d(0, 0, 0);
  animation: particleDrift var(--particle-duration) linear infinite;
  animation-delay: var(--particle-delay);
  will-change: transform, opacity;
}

@keyframes particleDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(0.78);
    opacity: 0;
  }

  12% {
    opacity: calc(var(--particle-opacity) * 0.78);
  }

  42% {
    transform: translate3d(calc(var(--particle-drift-x) * 0.42), calc(var(--particle-drift-y) * 0.42), 0) scale(1.08);
    opacity: var(--particle-opacity);
  }

  74% {
    opacity: calc(var(--particle-opacity) * 0.9);
  }

  100% {
    transform: translate3d(var(--particle-drift-x), var(--particle-drift-y), 0) scale(1.24);
    opacity: 0;
  }
}

.topbar,
.hero-content,
.section-band,
.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand-mark,
.topbar-actions,
.hero-actions,
.button,
.nav-pill,
.filter-bar,
.server-actions,
.meta-row,
.panel-header,
.card-footer,
.status-badge {
  display: flex;
  align-items: center;
}

.brand-mark {
  gap: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-pill,
.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(12, 15, 24, 0.52);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 40px;
  transition: 0.2s ease;
}

.nav-pill {
  gap: 0.42rem;
  padding: 0.55rem 0.82rem;
}

.nav-pill:hover,
.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  border-color: rgba(77, 114, 213, 0.52);
  background: rgba(48, 79, 158, 0.2);
}

.nav-pill-strong {
  background: rgba(48, 79, 158, 0.34);
}

.hero-content {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 18px rgba(77, 114, 213, 0.72);
}

.hero h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.48);
}

.hero-copy p {
  max-width: 680px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.55rem;
}

.button {
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.92rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 15px 32px rgba(48, 79, 158, 0.24);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button-disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-disabled:hover {
  transform: none;
}

.network-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(48, 79, 158, 0.28), transparent 15rem),
    rgba(18, 21, 31, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-header {
  gap: 0.55rem;
  padding-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(37, 196, 135, 0.11), 0 0 18px rgba(37, 196, 135, 0.46);
  animation: statusDotGlow 1.8s ease-in-out infinite;
}

.live-dot::after,
.status-badge::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.live-dot::after {
  inset: -7px;
  background: rgba(37, 196, 135, 0.2);
  transform-origin: center;
  animation: liveStatusPulse 1.8s ease-out infinite;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-item {
  min-width: 0;
  padding: 0.9rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-item strong,
.stat-item span {
  display: block;
}

.stat-item strong {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: 1;
}

.stat-item span {
  margin-top: 0.35rem;
  color: var(--muted-soft);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.network-panel p {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-band {
  padding: 3.5rem 0 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.filter-bar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.filter-chip {
  cursor: pointer;
  padding: 0.5rem 0.8rem;
}

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

.server-card {
  position: relative;
  min-height: 440px;
  display: grid;
  grid-template-rows: 190px 1fr;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.server-card.is-hidden {
  display: none;
}

.server-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 20%, var(--card-glow), transparent 19rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    #10131d;
}

.server-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--card-image);
  background-position: center;
  background-size: cover;
  opacity: var(--card-image-opacity, 0.2);
  filter: saturate(0.96) contrast(1.06);
}

.server-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 15%, rgba(14, 17, 26, 0.38) 58%, rgba(22, 22, 22, 1) 100%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.16), transparent 13rem);
}

.server-icon {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(8, 10, 17, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.server-icon i {
  font-size: 2.2rem;
}

.status-badge {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 3;
  gap: 0.5rem;
  max-width: calc(100% - 2rem);
  min-height: 34px;
  padding: 0.45rem 0.68rem;
  border-radius: 8px;
  background: rgba(6, 8, 14, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.status-badge::before {
  content: "";
  position: relative;
  z-index: 2;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--status-color);
  box-shadow: 0 0 14px var(--status-color), 0 0 0 5px color-mix(in srgb, var(--status-color) 18%, transparent);
  animation: statusDotGlow 1.8s ease-in-out infinite;
}

.status-badge::after {
  left: calc(0.68rem + 4.5px);
  top: 50%;
  z-index: 1;
  width: 24px;
  height: 24px;
  background: color-mix(in srgb, var(--status-color) 22%, transparent);
  transform: translate(-50%, -50%) scale(0.58);
  animation: statusPulse 1.8s ease-out infinite;
}

.status-badge[data-state="soon"]::before,
.status-badge[data-state="soon"]::after {
  animation-duration: 2.25s;
}

.status-badge[data-state="offline"]::before,
.status-badge[data-state="offline"]::after,
.status-badge[data-state="error"]::before,
.status-badge[data-state="error"]::after {
  animation-duration: 2.8s;
}

@keyframes statusPulse {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.58);
  }

  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.28);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.28);
  }
}

@keyframes liveStatusPulse {
  0% {
    opacity: 0.55;
    transform: scale(0.58);
  }

  70% {
    opacity: 0;
    transform: scale(1.35);
  }

  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes statusDotGlow {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.45);
  }
}

.server-body {
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
}

.server-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.server-title-row h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.08;
}

.server-kind {
  flex: 0 0 auto;
  padding: 0.34rem 0.55rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.server-desc {
  margin: 0.72rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.server-detail-list {
  display: grid;
  gap: 0.42rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  line-height: 1.45;
}

.server-detail-list li {
  position: relative;
  padding-left: 1rem;
}

.server-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 12px rgba(77, 114, 213, 0.55);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.34rem 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.72rem;
  font-weight: 800;
}

.access-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin-top: 0.85rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
}

.access-note i {
  color: var(--accent-strong);
}

.card-footer {
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.meta-row {
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  color: var(--muted-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.player-names {
  max-width: 100%;
}

.server-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.action-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  transition: 0.2s ease;
}

.action-button:hover {
  color: #fff;
  border-color: rgba(77, 114, 213, 0.46);
  background: rgba(48, 79, 158, 0.2);
  transform: translateY(-2px);
}

.action-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.action-button.is-disabled:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
}

.updates-band {
  padding-bottom: 3.5rem;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.update-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  background: rgba(22, 22, 22, 0.72);
}

.update-date {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.update-item h3 {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
}

.update-item p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.56);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer strong {
  color: #fff;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 4rem 0 5rem;
  }

  .network-panel {
    max-width: 520px;
  }

  .server-grid,
  .updates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero,
  .topbar,
  .hero-content,
  .section-band,
  .site-footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .hero {
    padding: 0.5rem;
  }

  .topbar,
  .section-head,
  .card-footer,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .filter-bar,
  .server-actions {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 17vw, 4rem);
  }

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

  .server-card {
    grid-template-rows: 160px 1fr;
    min-height: 0;
  }

  .server-title-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
