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

:root {
  --sky: #6ab4f5;
  --dark-bg: #111111;
  --card-bg: #1a1a1a;
  --teal: #2d7a7a;
  --teal-hover: #3a9a9a;
  --red: #cc2222;
  --red-hover: #e03333;
  --orange: #e07c00;
  --orange-hover: #f59000;
  --text: #e8e8e8;
  --muted: #888;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--dark-bg);
  color: var(--text);
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.has-site-header {
  padding-top: var(--site-header-offset, 78px);
}

body.has-site-header.is-home {
  padding-top: 0;
}

.site-header-inner {
  width: min(1280px, 100% - 40px);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo {
  width: 220px;
  max-width: 45vw;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.site-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.site-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-menu-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.site-header.is-nav-open .site-menu-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

.site-header.is-nav-open .site-menu-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.site-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.site-nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  max-height: 700px;
  background: #1a2a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-blur {
  position: absolute;
  inset: 0;
  background: inherit;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: url('/assets/images/spearmc.png') center/cover no-repeat;
  filter: blur(6px);
  transform: scale(1.05);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: min(920px, 100% - 40px);
}

.logo {
  max-width: 480px;
  width: 80vw;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.online-status {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(8, 8, 8, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 10px 18px;
  line-height: 1;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.online-status.is-online {
  color: #d9ffd6;
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(13, 44, 18, 0.75);
}

.online-status.is-offline {
  color: #ffd8d8;
  border-color: rgba(229, 57, 53, 0.6);
  background: rgba(57, 12, 12, 0.75);
}

.logo-text {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  -webkit-text-stroke: 3px #222;
  text-shadow:
    4px 4px 0 #880000,
    8px 8px 0 #440000;
  font-family: 'Segoe UI Black', 'Arial Black', sans-serif;
  text-transform: uppercase;
  display: none;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-buttons-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.btn:active { transform: translateY(0); }

.btn-teal { background: var(--teal); }
.btn-red  { background: var(--red); }
.btn-orange { background: var(--orange); }

.gamemodes {
  background: var(--dark-bg);
  padding: 64px 5vw;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #2a3a4a;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 20px 20px 24px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
}

.card-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.card-link:hover { color: var(--orange-hover); }

.rules {
  background: #0e0e0e;
  padding: 64px 5vw;
  border-top: 1px solid #1e1e1e;
}

.rules-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.rules-heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 32px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.rules-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 26px;
  border: 1px solid #222;
}

.rules-card--wide {
  grid-column: 1 / -1;
}

.rules-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rules-card ul li {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}

.rules-card ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #444;
}

.rules-card ul li strong { color: #ccc; }

.rules-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rules-mod-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.rules-mod-allowed { color: #4caf50; }
.rules-mod-banned  { color: #e53935; }

.rules-agreement {
  margin-top: 16px;
  font-size: 0.82rem;
  color: #555;
  font-style: italic;
}

.vote-banner {
  background: #3a9e2e;
  padding: 20px 5vw;
}

.vote-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.vote-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
}

.vote-text strong {
  font-size: 1rem;
  font-weight: 800;
}

.vote-text span {
  font-size: 0.82rem;
  opacity: 0.88;
}

.vote-btn {
  background: #fff;
  color: #222;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 36px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.footer {
  background: #0a0a0a;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid #1e1e1e;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 5vw 40px;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-col p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.82rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1e1e1e;
  text-align: center;
  padding: 18px 5vw;
  font-size: 0.78rem;
  color: #555;
}

@media (max-width: 700px) {
  .site-header-inner {
    width: min(1280px, 100% - 24px);
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0 14px;
  }
  .site-menu-toggle { display: inline-flex; }
  .site-logo { width: 170px; max-width: 72vw; }
  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    overflow: visible;
    padding-top: 4px;
    padding-bottom: 0;
  }
  .site-header.is-nav-open .site-nav {
    display: flex;
  }
  .site-nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    font-size: 0.72rem;
  }
  .hero { max-height: none; height: auto; padding: 80px 20px; }
  .hero-content { width: min(720px, 100% - 24px); gap: 20px; }
  .online-status { font-size: 0.8rem; padding: 8px 14px; }
  .gamemodes { padding: 40px 4vw; }
  .cards-grid { grid-template-columns: 1fr; }
  .rules { padding: 40px 4vw; }
  .rules-grid { grid-template-columns: 1fr; }
  .rules-card--wide { grid-column: auto; }
  .rules-mods { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .vote-inner { flex-direction: column; align-items: flex-start; }
  .vote-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 560px) {
  .hero { padding: 70px 16px; }
  .logo { width: 92vw; }
  .hero-buttons-row { gap: 10px; }
  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }
  .card-image { height: 180px; }
}
