:root {
  --bg: #0a0906;
  --bg-card: #12100a;
  --bg-elevated: #1a170c;
  --bg-deep: #0e0c07;
  --border: #3d3518;
  --border-bright: rgba(245, 197, 24, 0.35);
  --text: #f5f0e0;
  --muted: #a89f7a;
  --accent: #d4a800;
  --accent-bright: #ffd84d;
  --accent-deep: #b8860b;
  --caution-black: #141108;
  --copper: #c9a000;
  --iron: #8a9aaa;
  --diamond: #4fd4e8;
  --emerald: #3ecf8e;
  --gold: #ffd84d;
  --redstone: #c43c3c;
  --offline: #c45c5c;
  --glow: rgba(255, 216, 77, 0.14);
  --glow-strong: rgba(255, 216, 77, 0.22);
  --hazard-stripe: repeating-linear-gradient(
    -45deg,
    #ffd84d,
    #ffd84d 10px,
    #141108 10px,
    #141108 20px
  );
  --radius: 14px;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Rajdhani', var(--font-body);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 55% at 50% -10%, var(--glow-strong), transparent 55%),
    radial-gradient(ellipse 50% 30% at 85% 90%, rgba(255, 216, 77, 0.05), transparent),
    radial-gradient(ellipse 40% 25% at 5% 75%, rgba(212, 168, 0, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 56px,
    rgba(255, 216, 77, 0.018) 56px,
    rgba(255, 216, 77, 0.018) 57px
  );
  pointer-events: none;
  z-index: 0;
}

.rock-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 2;
  background: var(--hazard-stripe);
  box-shadow: 0 -2px 12px rgba(255, 216, 77, 0.15);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 9, 6, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-bright);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}

.site-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover { color: var(--text); background: var(--bg-elevated); }
.site-nav a.active { color: var(--caution-black); background: var(--accent-bright); font-weight: 600; }

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.topbar-players {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-players strong { color: var(--text); }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

.page-hero {
  text-align: center;
  padding: 2.5rem 0 1.75rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent-bright);
  margin-bottom: 0.6rem;
  text-shadow: 0 0 32px rgba(255, 216, 77, 0.25);
}

.page-hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--caution-black);
  background: var(--accent-bright);
  border: 2px solid var(--caution-black);
  border-radius: 4px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.25rem;
  box-shadow: 3px 3px 0 var(--caution-black);
}

.hero-badge::before {
  content: '⚠';
  font-size: 0.9rem;
  line-height: 1;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff3b0 0%, var(--accent-bright) 35%, var(--accent) 70%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 28px rgba(255, 216, 77, 0.2));
}

.tagline {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 32rem;
  margin: 0 auto 1.75rem;
}

.tagline strong { color: var(--accent-bright); font-weight: 600; }

.hero-join {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border-bright);
  border-radius: 8px;
  padding: 0.65rem 0.65rem 0.65rem 1.1rem;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 216, 77, 0.08);
}

.hero-join code {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
}

.btn {
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: var(--caution-black);
  border: 2px solid var(--caution-black);
  box-shadow: 0 2px 12px rgba(255, 216, 77, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffe566, var(--accent-bright));
  box-shadow: 0 4px 22px rgba(255, 216, 77, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.btn-sm { font-size: 0.78rem; padding: 0.4rem 0.85rem; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.nav-links a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-elevated); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-bright);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 216, 77, 0.04);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-bright);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card p, .card li { color: var(--muted); font-size: 0.92rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 2s ease infinite;
}

.status-badge.online .dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.status-badge.offline .dot { background: var(--offline); animation: none; }
.status-badge.online { border-color: #2a6b4a; color: var(--emerald); }
.status-badge.offline { border-color: #8b3a3a; color: var(--offline); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.status-header { margin-bottom: 1.1rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  text-align: center;
}

.stat .val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-bright);
  display: block;
  line-height: 1.2;
}

.stat .lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.1rem;
}

.player-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  font-size: 0.85rem;
}

.player-chip img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  image-rendering: pixelated;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.updated-at {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.75rem;
  opacity: 0.7;
}

.steps { list-style: none; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
}

.about-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  line-height: 1.65;
}

.about-text:last-child { margin-bottom: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

@media (max-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s;
}

.feature:hover { border-color: var(--border-bright); }
.feature .icon { font-size: 1.3rem; margin-bottom: 0.3rem; display: block; }

.feature h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.feature p { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }

.loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (max-width: 700px) { .loop { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .loop { grid-template-columns: 1fr; } }

.loop-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.loop-step .num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  opacity: 0.85;
  margin-bottom: 0.35rem;
}

.loop-step h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.loop-step p { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }

.inspiration {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-item:first-child { padding-top: 0; }

.faq-item h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.faq-item p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

.rules { list-style: none; display: grid; gap: 0.45rem; }

.rules li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.rules li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.rule-section { margin-bottom: 1.25rem; }
.rule-section:last-child { margin-bottom: 0; }

.rule-section h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.info-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }

.info-chip {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
}

.store-card, .vote-card, .contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-bright);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.store-card:hover, .vote-card:hover { border-color: var(--border-bright); }

.store-card h3, .vote-card h3, .contact-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.store-card .price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 0.5rem 0;
}

.store-card p, .vote-card p, .contact-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.store-card.coming-soon,
.vote-card.coming-soon {
  border-style: dashed;
  opacity: 0.9;
}

.badge-soon {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--caution-black);
  background: var(--accent-bright);
  border: 1px solid var(--caution-black);
  border-radius: 4px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.5rem;
}

.notice {
  background: rgba(255, 216, 77, 0.08);
  border: 2px solid var(--border-bright);
  border-left: 4px solid var(--accent-bright);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.notice strong { color: var(--accent-bright); }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 1rem;
}

footer a { color: var(--accent-bright); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-links a { font-size: 0.8rem; }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--accent-bright);
  color: var(--caution-black);
  border: 2px solid var(--caution-black);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.loading .val, .loading .player-grid { opacity: 0.4; }