:root {
  --bg: #07131d;
  --bg-soft: #0c1d2a;
  --ink: #f4fbff;
  --muted: #a7bdc9;
  --line: rgba(255, 255, 255, .13);
  --panel: rgba(10, 27, 39, .82);
  --panel-solid: #0f2230;
  --cyan: #4fd5ff;
  --green: #64f0a8;
  --amber: #ffd166;
  --red: #ff5c7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --radius: 8px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(7, 19, 29, .28), var(--bg) 580px),
    radial-gradient(circle at 10% 20%, rgba(79, 213, 255, .14), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(100, 240, 168, .13), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
}

body.is-locked {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

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

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(7, 19, 29, .42);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  min-height: 72px;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  position: fixed;
  right: 0;
  top: 0;
  transition: background .2s ease, box-shadow .2s ease;
  z-index: 30;
}

.site-header.is-scrolled {
  background: rgba(7, 19, 29, .9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

.brand,
.desktop-nav,
.header-actions {
  align-items: center;
  display: flex;
}

.brand {
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: var(--radius);
  color: #041019;
  display: grid;
  font-weight: 950;
  height: 36px;
  place-items: center;
  width: 36px;
}

.brand-mark img {
  border-radius: inherit;
  display: block;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
  width: 100%;
}

.desktop-nav {
  gap: 8px;
  justify-content: center;
}

.desktop-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
  padding: 8px 12px;
  transition: background .15s ease, color .15s ease;
}

.desktop-nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
}

.header-actions {
  gap: 10px;
}

.copy-ip,
.login-btn,
.primary-action,
.ghost-action,
.login-form button,
.menu-btn {
  border: 0;
  cursor: pointer;
}

.copy-ip {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 750;
  min-height: 38px;
  padding: 0 14px;
}

.login-btn {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: 999px;
  color: #031019;
  font-size: .9rem;
  font-weight: 850;
  min-height: 38px;
  padding: 0 18px;
}

.login-btn.is-authenticated {
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--line);
  color: var(--ink);
}

.menu-btn {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: none;
  height: 40px;
  padding: 9px;
  width: 42px;
}

.menu-btn span {
  background: var(--ink);
  border-radius: 999px;
  display: block;
  height: 2px;
  margin: 5px 0;
  transition: transform .18s ease, opacity .18s ease;
}

.menu-btn.is-open span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-btn.is-open span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-panel {
  background: rgba(7, 19, 29, .96);
  border-bottom: 1px solid var(--line);
  left: 0;
  padding: 84px 20px 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
}

.mobile-panel a {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 750;
  padding: 13px 14px;
}

.is-wide {
  margin-top: 10px;
  width: 100%;
}

.hero {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  min-height: 760px;
  overflow: hidden;
  padding: 150px max(22px, calc((100vw - var(--max)) / 2)) 58px;
  position: relative;
}

.hero-media,
.hero-shade,
.hero-grid {
  inset: 0;
  position: absolute;
}

.hero-media {
  background-image: url("main_spawn2.png");
  background-position: center top;
  background-size: cover;
  filter: saturate(1.1) contrast(1.04);
  transform: scale(1.025);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 19, 29, .86) 0%, rgba(7, 19, 29, .54) 52%, rgba(7, 19, 29, .88) 100%),
    linear-gradient(180deg, rgba(7, 19, 29, .14) 0%, rgba(7, 19, 29, .86) 92%);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, transparent 0, #000 30%, transparent 100%);
  opacity: .32;
}

.hero-content,
.status-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 760px;
}

.eyebrow,
.section-heading p,
.profile-copy > p,
.vote-section p,
.modal-kicker {
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(4.3rem, 11vw, 9.7rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: .86;
  margin-top: 14px;
  max-width: 860px;
  text-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}

.hero-copy {
  color: #d6e7ef;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.65;
  margin-top: 28px;
  max-width: 660px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.ghost-action {
  border-radius: var(--radius);
  font-weight: 900;
  min-height: 52px;
  padding: 0 18px;
}

.primary-action {
  align-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #031019;
  display: inline-flex;
  gap: 10px;
  line-height: 1;
}

.primary-action span {
  border-left: 1px solid rgba(3, 16, 25, .2);
  font-size: .82rem;
  font-weight: 850;
  padding-left: 10px;
  white-space: nowrap;
}

.ghost-action {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  color: var(--ink);
}

.status-panel {
  align-self: end;
  backdrop-filter: blur(22px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.status-head {
  align-items: center;
  display: flex;
  gap: 9px;
  font-weight: 850;
  margin-bottom: 18px;
}

.pulse {
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(100, 240, 168, .12);
  height: 9px;
  width: 9px;
}

.status-panel dl {
  display: grid;
  gap: 12px;
}

.status-panel dl div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.status-panel dt {
  color: var(--muted);
  font-size: .82rem;
}

.status-panel dd {
  font-size: .96rem;
  font-weight: 850;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.servers-section,
.profile-section,
.rules-section,
.vote-section {
  margin: 0 auto;
  max-width: var(--max);
  padding: 78px 22px 0;
}

.section-heading {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 120px minmax(0, 1fr);
  margin-bottom: 24px;
}

.section-heading p {
  line-height: 1.35;
  padding-top: 12px;
}

.section-heading h2,
.profile-copy h2,
.vote-section h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

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

.server-card,
.profile-preview,
.rules-section article {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .16);
}

.server-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 24px;
}

.server-card.is-featured {
  background:
    linear-gradient(180deg, rgba(79, 213, 255, .16), rgba(100, 240, 168, .07)),
    rgba(255, 255, 255, .035);
}

.server-tag {
  color: var(--amber);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.server-card h3,
.rules-section h3 {
  font-size: 1.45rem;
  margin-top: 16px;
}

.server-card p,
.rules-section p,
.profile-copy > p:last-child {
  color: var(--muted);
  line-height: 1.66;
  margin-top: 12px;
}

.server-card p {
  flex: 1;
}

.server-foot {
  border-top: 1px solid var(--line);
  color: #cce8f2;
  display: flex;
  align-items: center;
  font-size: .88rem;
  font-weight: 750;
  margin-top: 22px;
  min-height: 44px;
  padding-top: 16px;
}

.profile-section {
  align-items: center;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
}

.profile-copy > p:last-child {
  max-width: 650px;
}

.profile-preview {
  padding: 24px;
}

.profile-preview.is-authenticated {
  border-color: rgba(100, 240, 168, .42);
  box-shadow: 0 18px 52px rgba(100, 240, 168, .08);
}

.profile-top {
  align-items: center;
  display: flex;
  gap: 14px;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: var(--radius);
  color: #031019;
  display: grid;
  font-size: 1.2rem;
  font-weight: 950;
  height: 58px;
  place-items: center;
  width: 58px;
}

.avatar img {
  border-radius: inherit;
  display: block;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
  width: 100%;
}

.profile-top strong {
  display: block;
  font-size: 1.2rem;
}

.profile-top span {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.profile-status {
  background: rgba(100, 240, 168, .1);
  border: 1px solid rgba(100, 240, 168, .24);
  border-radius: var(--radius);
  color: #dfffee;
  font-size: .88rem;
  font-weight: 750;
  margin-top: 18px;
  padding: 10px 12px;
}

.stat-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.stat-list div {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.stat-list span {
  color: var(--muted);
  display: block;
  font-size: .84rem;
}

.stat-list strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 4px;
}

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

.rules-section article {
  padding: 24px;
}

.vote-section {
  align-items: center;
  background: linear-gradient(135deg, rgba(79, 213, 255, .18), rgba(100, 240, 168, .1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding: 32px;
}

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

.vote-actions a {
  background: var(--ink);
  border-radius: 999px;
  color: #06131c;
  font-weight: 900;
  padding: 12px 18px;
}

.site-footer {
  color: var(--muted);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  padding: 36px 22px;
}

.modal {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(4, 10, 16, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 60;
}

.modal-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 430px;
  padding: 28px;
  position: relative;
  width: 100%;
}

.modal-close {
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  height: 38px;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
}

.modal-card h2 {
  font-size: 2rem;
  margin-top: 8px;
}

.modal-text,
.form-note {
  color: var(--muted);
  line-height: 1.55;
}

.modal-text {
  margin-top: 10px;
}

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

.login-form label {
  display: grid;
  gap: 6px;
}

.login-form span {
  color: #cfe3ed;
  font-size: .9rem;
  font-weight: 750;
}

.login-form input {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 48px;
  outline: 0;
  padding: 0 14px;
}

.login-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 213, 255, .13);
}

.login-form button {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: var(--radius);
  color: #031019;
  font-weight: 950;
  min-height: 50px;
}

.form-note {
  font-size: .86rem;
  margin-top: 14px;
}

.toast {
  background: var(--ink);
  border-radius: 999px;
  bottom: 24px;
  box-shadow: var(--shadow);
  color: #05131c;
  font-weight: 900;
  left: 50%;
  padding: 12px 18px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 70;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .desktop-nav,
  .copy-ip {
    display: none;
  }

  .header-actions {
    justify-content: end;
  }

  .menu-btn {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 128px;
  }

  .status-panel {
    margin-top: 36px;
    max-width: 460px;
  }

  .server-grid,
  .profile-section,
  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .server-card {
    min-height: 0;
  }

  .profile-section {
    grid-template-columns: 1fr;
  }

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

  .vote-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 64px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand span:last-child {
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .login-btn:not(.is-wide) {
    display: none;
  }

  .hero {
    padding: 112px 16px 34px;
  }

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

  .hero-actions,
  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .primary-action,
  .ghost-action {
    justify-content: center;
  }

  .primary-action {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
  }

  .primary-action span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .servers-section,
  .profile-section,
  .rules-section {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 56px;
  }

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

  .section-heading {
    align-items: flex-start;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .section-heading p {
    padding-top: 0;
  }

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

  .vote-section {
    margin-left: 16px;
    margin-right: 16px;
    padding: 22px;
  }

  .site-footer {
    flex-direction: column;
    padding-left: 16px;
    padding-right: 16px;
  }
}
