:root {
  --bg: #121512;
  --panel: #1b211a;
  --panel-light: #242d22;
  --text: #f3f0e8;
  --muted: #b8b9ab;
  --line: rgba(255, 255, 255, 0.12);
  --green: #76b852;
  --gold: #d7a842;
  --red: #bd5748;
  --blue: #4d8ba6;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(118, 184, 82, 0.16), transparent 34rem),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 21, 18, 0.88);
  backdrop-filter: blur(14px);
}

.brand,
.nav,
.hero-actions,
.card-top,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header.menu-open .menu-toggle span:nth-child(1) {
  position: absolute;
  transform: rotate(45deg);
}

.site-header.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .menu-toggle span:nth-child(3) {
  position: absolute;
  transform: rotate(-45deg);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--green), #3e7d3f);
  color: #081006;
  font-weight: 800;
}

.nav {
  gap: 12px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  flex-wrap: wrap;
}

.nav a {
  border-radius: 7px;
  padding: 10px 12px;
}

.nav-login {
  display: none;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.nav a:hover,
.nav-login:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav a:hover,
.footer a:hover {
  color: var(--text);
}

.header-button,
.primary-button,
.secondary-button,
.donate-card button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.header-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button,
.donate-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #10130e;
  background: var(--gold);
}

.primary-button:hover,
.donate-card button:hover {
  filter: brightness(1.08);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

h3 {
  margin: 0;
  font-size: 22px;
}

.lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.server-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "ip ip"
    "version online";
  gap: 12px;
  align-items: stretch;
  max-width: 620px;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(118, 184, 82, 0.08));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.server-ip {
  grid-area: ip;
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
  border: 1px solid rgba(215, 168, 66, 0.28);
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.server-ip:hover {
  border-color: rgba(215, 168, 66, 0.48);
  background: rgba(215, 168, 66, 0.08);
}

.server-ip strong {
  color: var(--text);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.server-meta,
.server-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-hint {
  text-transform: none;
}

.online-status {
  grid-area: online;
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  justify-items: start;
  min-width: 132px;
  border: 1px solid rgba(118, 184, 82, 0.28);
  border-radius: 7px;
  padding: 12px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(118, 184, 82, 0.14), rgba(255, 255, 255, 0.045));
  font-weight: 700;
  text-align: left;
}

.online-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.online-status strong {
  color: #dff7d2;
  font-size: 18px;
  line-height: 1;
}

.online-status.offline {
  background: linear-gradient(180deg, rgba(189, 87, 72, 0.14), rgba(255, 255, 255, 0.045));
}

.online-status.offline strong {
  color: #ffb8ad;
}

.version-chip {
  grid-area: version;
  display: inline-grid;
  gap: 3px;
  border: 1px solid rgba(215, 168, 66, 0.28);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(215, 168, 66, 0.08);
}

.version-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.version-chip strong {
  color: #f4d17b;
  font-size: 16px;
  white-space: nowrap;
}

.copy-status {
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 4;
  width: min(88%, 360px);
  border: 1px solid rgba(118, 184, 82, 0.5);
  border-radius: 7px;
  padding: 8px 14px;
  color: #dff7d2;
  background: rgba(35, 90, 42, 0.95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 12px;
}

.social-link {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.055);
}

.social-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.social-link strong {
  color: var(--text);
  font-size: 16px;
}

.social-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.telegram-link {
  border-color: rgba(77, 139, 166, 0.48);
  color: #8ed1ef;
  background: rgba(77, 139, 166, 0.12);
}

.telegram-link:hover {
  border-color: rgba(142, 209, 239, 0.72);
  background: rgba(77, 139, 166, 0.18);
}

.discord-link {
  border-color: rgba(114, 137, 218, 0.48);
  color: #aebdff;
  background: rgba(114, 137, 218, 0.12);
}

.discord-link:hover {
  border-color: rgba(174, 189, 255, 0.72);
  background: rgba(114, 137, 218, 0.18);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.map-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11180f;
  box-shadow: var(--shadow);
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.map-toolbar a {
  color: var(--gold);
}

.world-map {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 390px;
  border: 0;
  background: #0b0f0b;
}

.map-fallback {
  display: none;
  min-height: 390px;
  padding: 28px;
  place-content: center;
  text-align: center;
  background: #0b0f0b;
}

.map-fallback h3 {
  margin: 0;
}

.map-fallback p {
  max-width: 420px;
  margin: 12px auto 18px;
  color: var(--muted);
  line-height: 1.55;
}

.map-blocked .world-map {
  display: none;
}

.map-blocked .map-fallback {
  display: grid;
}

.donate-grid,
.staff-grid {
  display: grid;
  gap: 16px;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 28px;
}

.section-heading p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.donate-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.donate-category {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.donate-category:first-of-type {
  margin-top: 0;
}

.donate-category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.donate-category-heading h3 {
  margin: 0;
  font-size: 24px;
}

.donate-category-heading span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subscription-grid {
  grid-template-columns: minmax(0, 420px);
}

.donate-card,
.staff-card,
.rules-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.donate-card {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 24px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.donate-card:hover,
.donate-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(215, 168, 66, 0.58);
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.emperor-card {
  border-color: rgba(118, 184, 82, 0.5);
}

.case-card {
  border-color: rgba(77, 139, 166, 0.44);
  background: linear-gradient(180deg, rgba(77, 139, 166, 0.13), rgba(255, 255, 255, 0.055));
}

.super-case-card {
  border-color: rgba(215, 168, 66, 0.55);
  background: linear-gradient(180deg, rgba(215, 168, 66, 0.16), rgba(77, 139, 166, 0.08));
}

.disabled-card {
  cursor: default;
  opacity: 0.76;
}

.disabled-card:hover {
  transform: none;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.disabled-card button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.65;
}

.donate-card.featured {
  border-color: rgba(215, 168, 66, 0.65);
  background:
    linear-gradient(180deg, rgba(215, 168, 66, 0.2), rgba(44, 54, 32, 0.82)),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(215, 168, 66, 0.18), 0 18px 42px rgba(0, 0, 0, 0.22);
}

.donate-card.featured .price,
.donate-card.featured h3 {
  color: #f4d17b;
}

.popular-label {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin: auto 0 10px;
  border: 1px solid rgba(215, 168, 66, 0.38);
  border-radius: 7px;
  padding: 7px 10px;
  color: #f4d17b;
  background: rgba(18, 21, 18, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.card-top {
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.donate-card h3 {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.price {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(215, 168, 66, 0.42);
  border-radius: 7px;
  padding: 6px 10px;
  color: var(--gold);
  background: rgba(215, 168, 66, 0.08);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.rank-idea {
  min-height: 78px;
  margin: 20px 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.donate-card button,
.full {
  width: 100%;
}

.donate-card button {
  margin-top: auto;
}

.rules-section {
  width: 100%;
  max-width: none;
  padding-right: max(18px, calc((100% - 1120px) / 2));
  padding-left: max(18px, calc((100% - 1120px) / 2));
  background: rgba(0, 0, 0, 0.18);
}

.rules-list {
  display: grid;
  gap: 12px;
}

.rules-list article {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.rules-list span {
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
}

.rules-list p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.rules-list h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rules-list ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.rules-list strong {
  color: var(--text);
}

.staff-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-card {
  padding: 24px;
  text-align: center;
}

.avatar {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  image-rendering: pixelated;
}

.staff-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.staff-role {
  display: inline-flex;
  justify-content: center;
  min-width: 120px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

.owner-role {
  border-color: rgba(215, 168, 66, 0.52);
  color: #f4d17b;
  background: rgba(215, 168, 66, 0.12);
}

.tech-role {
  border-color: rgba(77, 139, 166, 0.58);
  color: #8ed1ef;
  background: rgba(77, 139, 166, 0.14);
}

.support-section {
  padding-top: 34px;
}

.support-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.support-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.support-form input,
.support-form select,
.support-form textarea,
.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  outline: none;
}

.support-form textarea {
  min-height: 150px;
  resize: vertical;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus,
.login-form input:focus {
  border-color: rgba(215, 168, 66, 0.72);
  box-shadow: 0 0 0 3px rgba(215, 168, 66, 0.14);
}

.message-field,
.support-submit,
.form-status {
  grid-column: 1 / -1;
}

.support-submit {
  justify-self: start;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
}

.buy-modal {
  width: min(640px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.buy-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.buy-modal form {
  position: relative;
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 28px;
}

.buy-modal h2 {
  font-size: 30px;
}

.buy-modal p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

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

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-form input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.rank-details {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

.rank-details ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.rank-note {
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(215, 168, 66, 0.08);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .site-header {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
  }

  .site-header.menu-open .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav a {
    padding: 13px 12px;
    font-size: 16px;
  }

  .nav-login {
    display: block;
    width: 100%;
  }

  .header-button {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .server-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ip"
      "version"
      "online";
  }

  .online-status {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .donate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-grid,
  .subscription-grid {
    grid-template-columns: 1fr;
  }

  .support-form {
    grid-template-columns: 1fr;
  }

  .donate-card ul {
    min-height: 0;
  }

  .rank-idea {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section {
    width: min(100% - 28px, 1120px);
    padding: 52px 0;
  }

  .nav {
    gap: 12px;
  }

  .hero-actions a {
    width: 100%;
    justify-content: center;
  }

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

  .donate-category-heading {
    align-items: start;
    flex-direction: column;
  }

  .world-map {
    min-height: 280px;
  }

  .rules-list article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
