:root {
  --bg: #0b0b0b;
  --bg-elev: #141414;
  --bg-card: rgba(22, 22, 22, 0.78);
  --border: #2a2a2a;
  --border-copper: #a86b3c;
  --copper: #c07840;
  --copper-soft: rgba(192, 120, 64, 0.15);
  --copper-glow: rgba(192, 120, 64, 0.35);
  --text: #f2efe9;
  --text-1: #c8c2b8;
  --text-2: #8a847a;
  --discord: #5865f2;
  --online: #3ecf6e;
  --offline: #c05040;
  --rank1: #f0c040;
  --rank2: #c0c0c0;
  --rank3: #c07830;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --radius: 12px;
  --header-h: 64px;
  --safe: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overflow-x: hidden;
}

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(192, 120, 64, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(80, 50, 30, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 60%, rgba(40, 30, 20, 0.3), transparent 45%),
    var(--bg);
}
.bg-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-watermark {
  position: absolute;
  opacity: 0.06;
  filter: grayscale(0.3) brightness(0.7);
  user-select: none;
}
.bg-watermark-1 { top: 12%; right: 4%; width: min(220px, 28vw); transform: rotate(18deg); }
.bg-watermark-2 { bottom: 18%; left: 2%; width: min(160px, 22vw); transform: rotate(-12deg); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.65rem 1.25rem;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; filter: brightness(1.08); }
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
  flex: 1;
}
.nav-link {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--copper-soft);
  text-decoration: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-btn {
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-2);
  background: transparent;
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.lang-btn.active, .lang-btn:hover {
  color: var(--text);
  background: var(--copper-soft);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-1);
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--border-copper); text-decoration: none; color: var(--text); }
.btn-primary {
  background: linear-gradient(180deg, #d08a4a 0%, var(--copper) 100%);
  border-color: #e0a060;
  color: #1a1008;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 24px var(--copper-glow);
}
.btn-primary:hover { filter: brightness(1.08); color: #1a1008; }
.btn-primary.disabled, .btn-primary.disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-1);
}
.btn-discord {
  background: var(--discord);
  border-color: #7289da;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
}
.btn-discord:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 107, 60, 0.45);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(192, 120, 64, 0.08);
}

/* Main / Hero */
.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
}
.hero-left,
.hero-right {
  display: flex;
  min-height: 0;
}
.top-panel,
.server-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 100%;
  padding: 1.25rem 1.35rem 1.35rem;
}
.hero-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.top-header .hero-kicker {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.top-mode-toggle {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(16, 16, 16, 0.55);
}
.top-mode-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #9a958c);
  background: transparent;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.top-mode-btn + .top-mode-btn {
  border-left: 1px solid var(--border);
}
.top-mode-btn:hover {
  color: var(--text, #f2efe8);
}
.top-mode-btn.is-active {
  color: var(--copper);
  background: rgba(232, 165, 75, 0.12);
}
.top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 16, 16, 0.65);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
.btn-top-full {
  margin-top: 1rem;
  width: 100%;
}
.top-row {
  display: grid;
  grid-template-columns: 2.4rem 40px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-height: 56px;
  transition: background 0.12s;
}
.top-row:last-child { border-bottom: none; }
.top-row:hover { background: var(--copper-soft); }
.top-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--copper);
}
.top-rank.rank-1 { color: var(--rank1); }
.top-rank.rank-2 { color: var(--rank2); }
.top-rank.rank-3 { color: var(--rank3); }
.top-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-copper);
  object-fit: cover;
  background: var(--bg-elev);
}
.top-avatar-ph {
  display: inline-block;
  opacity: 0.35;
}
.top-name {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-score {
  font-family: var(--font-mono);
  color: var(--copper);
  font-size: 0.9rem;
  white-space: nowrap;
}
.top-score small { color: var(--text-2); font-size: 0.7rem; }
.top-empty {
  padding: 1.25rem;
  color: var(--text-2);
  text-align: center;
}

/* Server card */
.server-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.server-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1rem;
}
.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.server-status-badge.online {
  color: var(--online);
  border-color: rgba(62, 207, 110, 0.35);
  background: rgba(62, 207, 110, 0.08);
}
.server-status-badge.offline {
  color: var(--offline);
  border-color: rgba(192, 80, 64, 0.35);
  background: rgba(192, 80, 64, 0.08);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.server-stats-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}
.stat-big {
  font-size: 2.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--text);
}
.stat-big-slash {
  font-size: 1.8rem;
  color: var(--text-2);
  font-weight: 300;
}
.stat-max {
  font-size: 1.5rem;
  font-family: var(--font-mono);
  color: var(--text-1);
  font-weight: 600;
}
.stat-label {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.server-wipe-age {
  color: var(--text-2);
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}
.server-divider {
  height: 1px;
  background: var(--border);
  margin: 0.9rem 0;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.action-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 96px;
  padding: 0.85rem 0.5rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 20%, rgba(192, 120, 64, 0.12), transparent 70%),
    rgba(20, 20, 20, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-1);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}
.action-btn:hover {
  border-color: var(--border-copper);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 70% at 50% 20%, rgba(192, 120, 64, 0.22), transparent 70%),
    var(--copper-soft);
  transform: translateY(-1px);
}
.action-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(168, 107, 60, 0.35);
}
.action-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--copper-glow));
}
.btn-connect {
  width: 100%;
  margin-top: auto;
}

/* Wipe banner */
.wipe-banner {
  margin-top: 1.75rem;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(168, 107, 60, 0.4);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(192, 120, 64, 0.1), transparent 60%),
    rgba(16, 16, 16, 0.75);
}
.stress-banner {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  text-align: center;
  border: 1px solid rgba(200, 70, 50, 0.55);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(180, 50, 40, 0.18), transparent 70%),
    rgba(20, 12, 12, 0.85);
}
.stress-banner[hidden] {
  display: none !important;
}
.stress-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e07050;
  margin-bottom: 0.4rem;
}
.stress-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-1);
}
.wipe-type {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}
.countdown-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.2rem;
}
.countdown-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  color: var(--copper);
  text-shadow: 0 0 28px var(--copper-glow);
  letter-spacing: 0.04em;
}
.countdown-label {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-2);
}
.countdown-sep {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--text-2);
  font-weight: 300;
  padding-bottom: 1.1rem;
}
.countdown-modal .countdown-num {
  font-size: 1.8rem;
}
.countdown-modal .countdown-block {
  min-width: 3.2rem;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem calc(1.5rem + var(--safe));
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem;
}

/* Modals */
.modal {
  border: 1px solid rgba(168, 107, 60, 0.5);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.5rem;
  max-width: min(540px, calc(100vw - 2rem));
  width: 100%;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 50% at 100% 0%, rgba(192, 120, 64, 0.12), transparent 55%),
    rgba(18, 18, 18, 0.96);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.modal h2 {
  margin: 0 1.5rem 0.85rem 0;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-title-center {
  text-align: center;
  margin-right: 0 !important;
}
.modal-info {
  max-width: min(720px, calc(100vw - 1.5rem));
  max-height: min(90vh, 900px);
  overflow-y: auto;
}
.modal h3 {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper);
}
.modal-lead { margin: 0 0 0.2rem; color: var(--text); font-weight: 600; }
.modal-note { margin: 0; color: var(--text-2); font-size: 0.85rem; }
.modal-close-form { position: absolute; top: 0.65rem; right: 0.65rem; margin: 0; z-index: 2; }
.modal { position: relative; }
.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-1);
  font-size: 1.4rem;
  line-height: 1;
}
.modal-close:hover { border-color: var(--border-copper); color: var(--text); }

.modal-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  margin: -0.35rem 0 0.75rem;
}
.modal-hero-sm { height: 64px; }
.modal-hero-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px var(--copper-glow));
  z-index: 1;
}
.modal-hero-sm .modal-hero-icon { width: 56px; height: 56px; }
.modal-hero-deco {
  position: absolute;
  right: 8%;
  bottom: 0;
  width: 56px;
  height: 56px;
  opacity: 0.22;
  transform: rotate(18deg);
  object-fit: contain;
  pointer-events: none;
}

.wipe-schedule-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(168, 107, 60, 0.4);
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.65);
}
.wipe-schedule-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--copper-glow));
}
.wipe-until {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
}
.modal-wipe .countdown-modal {
  padding: 0.75rem 0.5rem 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}

.info-section {
  margin-top: 0.35rem;
}
.info-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
}
.info-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(168, 107, 60, 0.55), transparent);
}

.info-rates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.info-rate-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(168, 107, 60, 0.28);
  border-radius: 10px;
  background: rgba(22, 22, 22, 0.7);
}
.info-rate-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px var(--copper-glow));
}
.info-rate-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.info-rate-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.info-rate-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
}

.info-monument-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  align-items: start;
}
.info-monument-card {
  padding: 0.9rem 0.95rem 1rem;
  border: 1px solid rgba(168, 107, 60, 0.28);
  border-radius: 10px;
  background: rgba(22, 22, 22, 0.7);
  min-height: 100%;
}
.info-monument-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
.info-monument-head img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px var(--copper-glow));
}
.info-monument-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.info-monument-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.info-monument-list li {
  position: relative;
  padding: 0.28rem 0 0.28rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-1);
  line-height: 1.35;
}
.info-monument-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.45rem;
  height: 1px;
  background: var(--copper);
  opacity: 0.85;
}

.map-preview {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

/* Leaderboard overlay */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(10px);
}
.lb-overlay[hidden] { display: none !important; }
.lb-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(14, 14, 14, 0.95);
}
.lb-overlay-title {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--copper);
}
.lb-overlay iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero { gap: 1.25rem; }
  .countdown-block { min-width: 3.5rem; }
}

@media (max-width: 768px) {
  .site-header { flex-wrap: wrap; padding: 0.55rem 0.85rem; }
  .brand-logo { height: 44px; max-width: 130px; }
  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin: 0.35rem 0 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .btn-discord span { display: none; }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-left,
  .hero-right {
    min-height: 0;
  }
  .top-panel,
  .server-card {
    min-height: 0;
  }
  /* Mobile: server card first (connect), then top 5 */
  .hero-right { order: 1; }
  .hero-left { order: 2; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .action-grid .action-btn:nth-child(3) { grid-column: 1 / -1; }
  .site-main { padding: 1rem 0.85rem 2rem; }
  .wipe-banner { margin-top: 1.25rem; padding: 1.15rem 0.85rem; }
  .info-rates-grid { grid-template-columns: 1fr 1fr; }
  .info-monument-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand-logo { height: 40px; max-width: 112px; }
  .stat-big { font-size: 2.1rem; }
  .top-row {
    grid-template-columns: 2rem 36px 1fr;
    grid-template-rows: auto auto;
  }
  .top-score {
    grid-column: 3;
    font-size: 0.8rem;
  }
  .countdown-block { min-width: 2.8rem; }
  .countdown-num { font-size: 1.6rem; }
  .modal-hero { height: 72px; }
  .info-rates-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1280px) {
  .site-main { padding-top: 2rem; }
  .top-panel,
  .server-card { padding: 1.5rem 1.6rem; }
  .stat-big { font-size: 3rem; }
  .brand-logo { height: 58px; max-width: 180px; }
}

/* ── Auth / login ── */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(192, 120, 64, 0.45);
  background: linear-gradient(180deg, rgba(40, 28, 18, 0.95) 0%, rgba(22, 16, 12, 0.98) 100%);
  color: #e8d5c0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-login img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(192, 120, 64, 0.35));
}
.btn-login:hover {
  text-decoration: none;
  border-color: var(--copper);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(192, 120, 64, 0.2);
  transform: translateY(-1px);
}

.login-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3.5rem 1rem 4rem;
  min-height: min(70vh, 640px);
}
.login-card {
  width: min(420px, 100%);
  padding: 2rem 1.75rem 1.85rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: login-card-in 0.45s ease both;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  opacity: 0.85;
}
@keyframes login-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.login-card-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(192, 120, 64, 0.35));
}
.login-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f0e6d8;
}
.login-subtitle {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(200, 194, 184, 0.72);
}
.login-alert {
  margin: 0 0 1.1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(180, 70, 50, 0.45);
  background: rgba(70, 24, 18, 0.45);
  text-align: left;
}
.login-alert p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #e8c4b8;
}
.login-alert-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--copper);
}
.login-providers {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.btn-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn-provider:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-provider img,
.btn-provider svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.btn-provider-steam {
  border-color: #2a475e;
  background: linear-gradient(180deg, #1b2838 0%, #12161c 100%);
  color: #c7d5e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.btn-provider-steam:hover {
  border-color: var(--copper);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(192, 120, 64, 0.15);
}
.btn-provider-steam img {
  filter: drop-shadow(0 0 4px rgba(192, 120, 64, 0.3));
}
.btn-provider-discord {
  border-color: rgba(88, 101, 242, 0.45);
  background: linear-gradient(180deg, #3c45a5 0%, #2b3178 100%);
  color: #f2f3ff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.btn-provider-discord:hover {
  border-color: #8b95ff;
  color: #fff;
  background: linear-gradient(180deg, #4650b8 0%, #323a8c 100%);
}
.login-discord-note {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(200, 194, 184, 0.55);
}

/* legacy Steam btn */
.btn-steam {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #2a475e;
  background: linear-gradient(180deg, #1b2838 0%, #171a21 100%);
  color: #c7d5e0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn-steam img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(192, 120, 64, 0.35));
}
.btn-steam:hover {
  text-decoration: none;
  border-color: var(--copper);
  color: #fff;
}
.user-menu { position: relative; }
.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 20, 0.85);
  color: var(--text);
}
.user-menu-btn:hover { border-color: var(--copper); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-copper);
}
.user-avatar-ph { object-fit: contain; background: #1a1a1a; padding: 2px; }
.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(16, 16, 16, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-dropdown[hidden] { display: none !important; }
.user-dropdown a {
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 0.85rem;
}
.user-dropdown a:hover {
  background: var(--copper-soft);
  color: var(--text);
  text-decoration: none;
}

/* ── Presence dock ── */
.presence-dock {
  position: fixed;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(0.85rem, calc(var(--safe) + 0.85rem));
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.presence-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem 0.55rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 107, 60, 0.45);
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s, transform 0.15s;
}
.presence-fab:hover {
  border-color: var(--copper);
  transform: translateY(-1px);
}
.presence-fab-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
}
.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 0 rgba(62, 207, 110, 0.55);
  animation: presence-pulse 2s ease-out infinite;
}
@keyframes presence-pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 110, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 110, 0); }
}
.presence-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.presence-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.presence-panel {
  width: min(280px, calc(100vw - 1.7rem));
  max-height: min(360px, 50vh);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-copper);
}
.presence-panel[hidden] { display: none !important; }
.presence-panel-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
}
.presence-panel-head img { width: 20px; height: 20px; object-fit: contain; }
.presence-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.2rem;
}
.presence-close:hover { color: var(--text); }
.presence-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
}
.presence-empty {
  padding: 1rem 0.75rem;
  color: var(--text-2);
  font-size: 0.85rem;
  text-align: center;
}
.presence-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.presence-row:hover {
  background: var(--copper-soft);
  text-decoration: none;
}
.presence-row img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.presence-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── Profile ── */
.profile-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}
.profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
}
.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border-copper);
  box-shadow: 0 0 24px var(--copper-glow);
}
.profile-avatar-ph {
  object-fit: contain;
  background: #161616;
  padding: 10px;
}
.profile-name {
  margin: 0 0 0.2rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.profile-steamid {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
}
.profile-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}
.profile-hero-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
.profile-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rank1);
  letter-spacing: 0.06em;
}
.profile-score-val {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--copper);
  line-height: 1;
}
.profile-score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
}
.profile-empty-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-1);
}
.profile-empty-stats img { opacity: 0.75; }
.profile-empty { color: var(--text-2); padding: 1rem 0; }
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(18, 18, 18, 0.7);
  border: 1px solid var(--border);
}
.profile-tab {
  flex: 1;
  min-width: 100px;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-tab.is-active {
  background: var(--copper-soft);
  color: var(--copper);
  box-shadow: inset 0 0 0 1px rgba(168, 107, 60, 0.35);
}
.profile-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.profile-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
}
.profile-tile-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.profile-tile-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.profile-tile-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.profile-cats { padding: 1rem 1.15rem; }
.profile-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper);
}
.profile-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.profile-cat-row {
  display: grid;
  grid-template-columns: 24px minmax(70px, 90px) 1fr auto;
  align-items: center;
  gap: 0.55rem;
}
.profile-cat-row img { width: 24px; height: 24px; object-fit: contain; }
.profile-cat-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-1);
}
.profile-cat-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.profile-cat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a4f28, var(--copper));
  min-width: 2px;
  transition: width 0.35s ease;
}
.profile-cat-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-1);
  min-width: 3.5rem;
  text-align: right;
}
.profile-history { padding: 0.5rem; overflow-x: auto; }
.profile-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.profile-history-table th,
.profile-history-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.profile-history-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  font-weight: 700;
}
.profile-history-table td { font-variant-numeric: tabular-nums; }

/* ── VIP info page ── */
.vip-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 1.5rem;
}
.vip-hero {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.35rem 1.4rem;
}
.vip-hero-icon-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(168, 107, 60, 0.45);
  background: var(--copper-soft);
  box-shadow: 0 0 20px var(--copper-glow);
}
.vip-hero-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--copper-glow));
}
.vip-hero-text { min-width: 0; }
.vip-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.vip-lead {
  margin: 0;
  color: var(--text-1);
  font-size: 0.98rem;
  max-width: 42rem;
}
.vip-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.15rem;
  border-color: rgba(168, 107, 60, 0.55);
  background: linear-gradient(135deg, rgba(192, 120, 64, 0.14), rgba(22, 22, 22, 0.85));
}
.vip-notice-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.1rem;
  filter: drop-shadow(0 0 5px var(--copper-glow));
}
.vip-notice-text {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}
.vip-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}
.vip-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.05rem 1.1rem 1.15rem;
  border-color: rgba(168, 107, 60, 0.4);
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vip-card:hover {
  border-color: rgba(192, 120, 64, 0.7);
  box-shadow: 0 0 28px rgba(192, 120, 64, 0.18);
}
.vip-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.vip-card-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px var(--copper-glow));
}
.vip-card-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.vip-card-badge {
  flex-shrink: 0;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--copper);
  color: #1a120c;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.vip-card-body {
  margin: 0;
  color: var(--text-1);
  font-size: 0.9rem;
  line-height: 1.55;
}
.vip-cmd {
  display: inline;
  padding: 0.05em 0.28em;
  border-radius: 4px;
  background: var(--copper-soft);
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .vip-benefits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .vip-hero { flex-direction: column; align-items: flex-start; }
  .vip-benefits { grid-template-columns: 1fr; }
  .vip-card-head { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .profile-tiles { grid-template-columns: repeat(2, 1fr); }
  .user-name { display: none; }
  .btn-steam span,
  .btn-login span { display: none; }
  .presence-label { display: none; }
  .profile-hero-score { align-items: flex-start; width: 100%; }
  .profile-cat-row {
    grid-template-columns: 24px 1fr auto;
    grid-template-rows: auto auto;
  }
  .profile-cat-bar { grid-column: 2 / -1; }
}

@media (max-width: 480px) {
  .profile-tiles { grid-template-columns: 1fr 1fr; }
  .profile-avatar { width: 72px; height: 72px; }
}
