/*
Theme Name: MMC Dark HQ
Theme URI: https://myminecraft.com
Author: MyMinecraft Community
Description: Dark server-network HQ with Minecraft-block UI accents and Hytale twilight palette.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mmc
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg-0: #0d1117;
  --bg-1: #131a23;
  --bg-2: #1b2330;
  --bg-3: #243042;
  --line: #2c3a52;
  --line-strong: #3a4d6e;

  --fg-0: #e8edf5;
  --fg-1: #b4bfd0;
  --fg-2: #7a8699;
  --fg-3: #4d5868;

  --grass:     oklch(0.72 0.18 145);
  --grass-dim: oklch(0.55 0.14 145);
  --diamond:   oklch(0.82 0.13 200);
  --gold:      oklch(0.82 0.15 85);
  --redstone:  oklch(0.68 0.21 25);
  --lapis:     oklch(0.55 0.18 260);
  --amethyst:  #a78bfa;

  --font-ui:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-pixel: 'Press Start 2P', monospace;

  --max-w: 1280px;
  --pad-x: 28px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(180deg, #0a0e1f 0%, #0e1326 30%, #0d1117 70%, #0a0e14 100%);
  background-attachment: fixed;
  color: var(--fg-0);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg-0);
}
h1 { font-size: clamp(36px, 4.5vw, 56px); letter-spacing: -0.025em; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(16px, 2vw, 20px); }
h4 { font-size: 17px; }

p { color: var(--fg-1); }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.mono  { font-family: var(--font-mono); }
.pixel { font-family: var(--font-pixel); }
.muted { color: var(--fg-2); }
.dim   { color: var(--fg-1); }
.row   { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   EYEBROW
   ============================================================ */
.eyebrow {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--grass);
  text-transform: uppercase;
  display: block;
}

/* ============================================================
   PIXEL PANEL CHROME
   ============================================================ */
.pixel-panel {
  background: var(--bg-1);
  border: 2px solid #0a0e14;
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    inset 0 -3px 0 rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 40px -16px rgba(0,0,0,0.6);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms, background 150ms, box-shadow 150ms, border-color 150ms;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grass);
  color: #0a1410;
  border-color: transparent;
  box-shadow:
    inset 0 -3px 0 rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 0 24px -8px var(--grass);
}
.btn-primary:hover {
  background: oklch(0.76 0.18 145);
  box-shadow:
    inset 0 -3px 0 rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 0 32px -6px var(--grass);
}

.btn-ghost {
  background: var(--bg-2);
  color: var(--fg-0);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-3); border-color: var(--line-strong); }

.btn-pixel {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.5px;
  border-radius: 4px;
  padding: 14px 18px 12px;
  border: 2px solid #0a0e14;
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,0.3),
    inset 0 3px 0 rgba(255,255,255,0.22);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card-hover {
  transition: transform 150ms ease, border-color 150ms, box-shadow 150ms;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.6);
}

/* ============================================================
   TOP BAR / HEADER
   ============================================================ */
.mmc-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 31, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.mmc-header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.mmc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--fg-0);
  text-decoration: none;
  flex-shrink: 0;
}
.mmc-logo-mark {
  width: 32px;
  height: 32px;
  position: relative;
  image-rendering: pixelated;
  background: linear-gradient(180deg, var(--grass) 0%, var(--grass) 28%, #6b5435 28%, #6b5435 100%);
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,0.35),
    inset 0 4px 0 rgba(255,255,255,0.18),
    0 0 0 2px #0a0e14;
  flex-shrink: 0;
}
.mmc-logo-mark .speckle {
  position: absolute;
  background: #4a7c2a;
}
.mmc-logo-name .accent { color: var(--grass); }

/* Nav */
.mmc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.mmc-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--fg-1);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background 150ms, color 150ms;
}
.mmc-nav a:hover {
  background: var(--bg-2);
  color: var(--fg-0);
}
.mmc-nav a.current-menu-item,
.mmc-nav a[aria-current="page"],
.mmc-nav a.is-active {
  color: var(--grass);
  background: color-mix(in oklch, var(--grass) 12%, transparent);
}

/* Dropdown menus */
.mmc-nav .nav-item {
  position: relative;
}
.mmc-nav .nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.mmc-nav .has-dropdown:hover .nav-dropdown,
.mmc-nav .has-dropdown:focus-within .nav-dropdown {
  display: flex;
}
.mmc-nav .nav-arrow {
  font-size: 11px;
  opacity: 0.6;
  pointer-events: none;
}
.mmc-nav .nav-dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--fg-1);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 150ms, color 150ms;
  white-space: nowrap;
}
.mmc-nav .nav-dropdown-item:hover,
.mmc-nav .nav-dropdown-item.is-active {
  background: var(--bg-2);
  color: var(--fg-0);
}

/* Top-right pills */
.mmc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* World clock pill */
.world-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg-1);
  cursor: default;
  user-select: none;
}
.world-clock-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 400ms, box-shadow 400ms;
}
.world-clock-dot.day {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.world-clock-dot.night {
  background: #cbd5f5;
  box-shadow: inset -3px 0 0 #1f2937;
}
.world-clock-label {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Live status pill */
.mmc-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--grass);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--grass) 25%, transparent);
  animation: pulse-dot 2s ease-in-out infinite;
}
.live-dot.offline {
  background: var(--fg-3);
  box-shadow: none;
  animation: none;
}
.mmc-live strong { color: var(--fg-0); font-weight: 600; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklch, var(--grass) 25%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in oklch, var(--grass) 8%, transparent); }
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--fg-1);
  cursor: pointer;
  font-size: 16px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 320px at 78% 18%, rgba(186,168,255,0.22), transparent 70%),
    radial-gradient(700px 400px at 18% 92%, rgba(251,146,60,0.18), transparent 65%),
    radial-gradient(900px 500px at 50% 110%, rgba(110,231,183,0.20), transparent 60%),
    linear-gradient(180deg, #0a0e1f 0%, #0d1326 50%, #0d1117 100%);
  pointer-events: none;
}
.hero-screenshot {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: screen;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 88px var(--pad-x) 32px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
}
.hero-copy { padding-top: 32px; }

/* Pixel banner eyebrow */
.pixel-banner {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--gold);
  padding: 8px 14px 6px;
  background: rgba(20, 28, 42, 0.6);
  border: 2px solid #0a0e14;
  box-shadow:
    inset 0 0 0 1px var(--gold),
    inset 0 -3px 0 rgba(0,0,0,0.35),
    inset 0 2px 0 rgba(255,255,255,0.08);
}

.hero-h1 { margin-top: 22px; }
.hero-h1 .accent {
  position: relative;
  display: inline-block;
  color: var(--grass);
}
.hero-h1 .accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--grass), transparent);
  opacity: 0.6;
}

.hero-desc {
  font-size: 18px;
  color: var(--fg-1);
  max-width: 560px;
  margin-top: 18px;
}

/* Copy-IP block */
.ip-block {
  margin-top: 28px;
  display: inline-flex;
  align-items: stretch;
  background: rgba(13,17,23,0.85);
  border: 2px solid #0a0e14;
  box-shadow:
    inset 0 0 0 1px var(--grass-dim),
    inset 0 -3px 0 rgba(0,0,0,0.35),
    inset 0 2px 0 rgba(255,255,255,0.05);
  padding: 6px;
  gap: 6px;
}
.ip-block-label-wrap {
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ip-block-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--fg-2);
  letter-spacing: 1.5px;
}
.ip-block-address {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--fg-0);
  margin-top: 4px;
}
.ip-copy-btn {
  min-width: 132px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 1px;
  background: var(--grass);
  color: #0a1410;
  border: 2px solid #0a0e14;
  box-shadow:
    inset 0 -4px 0 rgba(0,0,0,0.3),
    inset 0 3px 0 rgba(255,255,255,0.22);
  cursor: pointer;
  padding: 12px 18px 10px;
  transition: background 100ms, color 100ms;
}
.ip-copy-btn:active { transform: translateY(1px); }
.ip-copy-btn.copied {
  background: oklch(0.65 0.15 145);
  color: #fff;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Server status panel */
.status-panel { overflow: hidden; }
.status-panel-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, color-mix(in oklch, var(--grass) 18%, transparent), transparent);
}
.status-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-panel-title strong {
  font-size: 11px;
  font-family: var(--font-pixel);
  letter-spacing: 1.5px;
  color: var(--grass);
}
.status-panel-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.stat-cell {
  padding: 16px 18px;
}
.stat-cell.border-left { border-left: 1px solid var(--line); }
.stat-cell.border-top  { border-top: 1px solid var(--line); }
.stat-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--fg-2);
  letter-spacing: 1.5px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  margin-top: 6px;
  color: var(--fg-0);
}
.stat-sub {
  font-size: 11px;
  color: var(--fg-2);
  margin-top: 2px;
}

/* Gamemodes */
.gamemodes {
  padding: 18px;
  border-top: 1px solid var(--line);
}
.gamemodes-label {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--fg-2);
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.mode-row.dim { opacity: 0.55; }
.mode-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 12px;
  flex-shrink: 0;
}
.mode-name { flex: 1; font-size: 14px; }
.mode-bar {
  width: 70px;
  height: 4px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
}
.mode-bar-fill {
  height: 100%;
  opacity: 0.7;
  border-radius: 2px;
}
.mode-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  width: 50px;
  text-align: right;
}

/* Floating blocks */
.floating-blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  perspective: 800px;
}
.iso-cube {
  position: absolute;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateZ(-45deg);
}
.iso-cube-face {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
}

/* Grass strip */
.grass-strip {
  position: relative;
  height: 12px;
  background:
    repeating-linear-gradient(
      90deg,
      #5d8a32 0 4px,
      #4a7c2a 4px 8px,
      #6b5435 8px 12px,
      #5d8a32 12px 16px
    );
  box-shadow:
    inset 0 -3px 0 rgba(0,0,0,0.25),
    inset 0 2px 0 rgba(255,255,255,0.1);
  opacity: 0.7;
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ticker-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--fg-1);
  flex-wrap: wrap;
  row-gap: 8px;
}
.ticker-label {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold);
  flex-shrink: 0;
}
.ticker-sep { color: var(--fg-3); }
.ticker-item { color: var(--fg-1); text-decoration: none; white-space: nowrap; }
.ticker-item:hover { color: var(--fg-0); }
.ticker-view-all {
  margin-left: auto;
  color: var(--fg-2);
  font-size: 12px;
  font-family: var(--font-mono);
  text-decoration: none;
}
.ticker-view-all:hover { color: var(--fg-1); }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 64px var(--pad-x) 24px;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header-link {
  font-size: 14px;
  color: var(--fg-2);
  text-decoration: none;
}
.section-header-link:hover { color: var(--fg-1); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 150ms, border-color 150ms, box-shadow 150ms;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.6);
}
.feature-card-top {
  height: 140px;
  position: relative;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}
.feature-card-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}
.feature-card-body { padding: 22px; }
.feature-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 3px;
}
.feature-card-body h3 { margin-top: 12px; font-size: 20px; }
.feature-card-body p { color: var(--fg-1); margin-top: 8px; font-size: 14px; }

/* ============================================================
   TWO WORLDS
   ============================================================ */
.worlds-section {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 40px var(--pad-x) 24px;
}
.worlds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.world-card {
  position: relative;
  overflow: hidden;
  border: 2px solid #0a0e14;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.3);
}
.world-card-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.world-card-inner {
  position: relative;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 20px;
  align-items: center;
}
.world-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 5px 10px;
}
.world-card h2 { font-size: 36px; margin-top: 12px; }
.world-stats {
  display: flex;
  gap: 28px;
  margin-top: 18px;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.world-stat-key {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--fg-2);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.world-stat-val {
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 4px;
}
.world-illo {
  height: 180px;
  display: grid;
  place-items: center;
}

/* Minecraft isometric cube illo */
.mc-cube {
  width: 100px;
  height: 100px;
  transform: rotateX(55deg) rotateZ(-45deg);
  transform-style: preserve-3d;
  position: relative;
}
.mc-cube-face {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.3);
}

/* Hytale hex rune illo */
.hytale-illo { position: relative; width: 160px; height: 160px; }

/* ============================================================
   NEWS + LEADERBOARD
   ============================================================ */
.news-lb-section {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 40px var(--pad-x) 80px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-row {
  padding: 18px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.news-date {
  width: 56px;
  flex-shrink: 0;
  text-align: center;
  padding-top: 2px;
}
.news-date-month {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  text-transform: uppercase;
}
.news-date-day { font-size: 22px; font-weight: 700; }
.news-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 3px;
}
.news-row h4 { font-size: 17px; margin-top: 10px; margin-bottom: 6px; }
.news-row p  { color: var(--fg-1); font-size: 14px; }

/* Leaderboard */
.leaderboard-card { padding: 10px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
}
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-rank {
  width: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.lb-head {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 2px;
  flex-shrink: 0;
  image-rendering: pixelated;
}
.lb-name { flex: 1; font-size: 14px; }
.lb-hours {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.mmc-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.mmc-footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 32px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-copyright { font-size: 13px; color: var(--fg-2); }
.footer-links {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 13px;
}
.footer-links a {
  color: var(--fg-1);
  text-decoration: none;
}
.footer-links a:hover { color: var(--fg-0); }

/* ============================================================
   SINGLE POST / PAGE
   ============================================================ */
.post-container {
  max-width: 780px;
  margin-inline: auto;
  padding: 64px var(--pad-x) 80px;
}
.post-header { margin-bottom: 32px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.post-date { font-size: 13px; color: var(--fg-2); font-family: var(--font-mono); }

.entry-content {
  color: var(--fg-1);
  line-height: 1.7;
  font-size: 16px;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--fg-0);
  margin-top: 32px;
  margin-bottom: 12px;
}
.entry-content p { margin-bottom: 16px; }
.entry-content ul,
.entry-content ol {
  padding-left: 28px;
  margin-bottom: 16px;
}
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--grass); text-decoration: underline; }
.entry-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--diamond);
}
.entry-content pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
}
.entry-content blockquote {
  border-left: 3px solid var(--grass);
  padding-left: 20px;
  margin: 20px 0;
  color: var(--fg-1);
  font-style: italic;
}
.entry-content img {
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-block: 20px;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.post-nav a {
  font-size: 14px;
  color: var(--fg-1);
  text-decoration: none;
}
.post-nav a:hover { color: var(--fg-0); }

/* Archive */
.archive-header {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 64px var(--pad-x) 32px;
}
.archive-list {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 var(--pad-x) 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 404 */
.not-found {
  max-width: 560px;
  margin-inline: auto;
  padding: 120px var(--pad-x) 80px;
  text-align: center;
}
.not-found .pixel-404 {
  font-family: var(--font-pixel);
  font-size: 48px;
  color: var(--grass);
  letter-spacing: 4px;
  display: block;
  margin-bottom: 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }
  .status-panel { display: none; } /* show via toggle on mobile */
  .features-grid { grid-template-columns: 1fr 1fr; }
  .worlds-grid { grid-template-columns: 1fr; }
  .news-lb-section {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }
  .world-card-inner { grid-template-columns: 1fr; }
  .world-illo { display: none; }
}

@media (max-width: 640px) {
  :root { --pad-x: 16px; }
  .mmc-nav { display: none; }
  .mmc-nav.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .mmc-nav.is-open .nav-item { width: 100%; }
  .mmc-nav.is-open .nav-dropdown {
    display: flex;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--line);
    border-radius: 0;
    padding: 4px 0 4px 12px;
    margin-left: 14px;
    background: transparent;
  }
  .menu-toggle { display: block; }
  .mmc-header-inner { flex-wrap: wrap; }
  .mmc-header-right { gap: 8px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-cta-row { flex-direction: column; }
  .ip-block { flex-direction: column; }
  .ip-copy-btn { width: 100%; }
  .ticker-inner { gap: 12px; }
  .world-clock { display: none; }
  .footer-links { margin-left: 0; margin-top: 8px; width: 100%; }
  .mmc-footer-inner { flex-direction: column; align-items: flex-start; }
}
