/* ============================================================
   MINESITE — server.css  (redesigned + all bugs fixed)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --bg:           #050c05;
  --bg-2:         #0b160b;
  --bg-3:         #111d11;
  --bg-card:      #0d1a0d;
  --bg-elevated:  #152115;
  --border:       #1c301c;
  --border-2:     #2a4a2a;
  --border-focus: #4ade80;
  --green:        #4ade80;
  --green-dim:    #34c265;
  --green-muted:  #2a9e52;
  --green-glow:   rgba(74,222,128,0.18);
  --green-soft:   rgba(74,222,128,0.08);
  --mc-glow:      rgba(74,222,128,0.12);
  --gold:         #f59e0b;
  --gold-soft:    rgba(245,158,11,0.1);
  --cyan:         #22d3ee;
  --cyan-soft:    rgba(34,211,238,0.08);
  --text:         #e4f2e4;
  --text-2:       #9dbe9d;
  --text-3:       #587058;
  --danger:       #f87171;
  --success:      #4ade80;
  --sans:   'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:   'DM Mono', 'Courier New', monospace;
  --pixel:  'Press Start 2P', cursive;
  --radius:      6px;
  --radius-lg:   12px;
  --radius-xl:   18px;
  --sidebar-w:   268px;
  --header-h:    68px;
  --bar-h:       46px;
  --sticky-top:  calc(var(--header-h) + var(--bar-h));
  --dur-fast:  0.14s;
  --dur-base:  0.22s;
  --dur-slow:  0.38s;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --transition: all var(--dur-base) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(74,222,128,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.pixel     { font-family: var(--pixel); letter-spacing: 0.05em; }
.mono      { font-family: var(--mono); }
.container { max-width: 1300px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

.skip-link {
  position: absolute; top: -60px; left: 1rem;
  background: var(--green); color: var(--bg);
  padding: 10px 20px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; z-index: 9999;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(5,12,5,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--header-h); gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon-svg {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--border-2);
}
.logo-text {
  font-family: var(--pixel); font-size: 0.64rem;
  color: var(--green); letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(74,222,128,0.6);
  transition: color var(--dur-base) var(--ease);
}
.logo:hover .logo-text { color: #b9f5d0; }

.main-nav ul { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.main-nav a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  text-decoration: none; letter-spacing: 0.01em;
  transition: color var(--dur-base) var(--ease);
  position: relative; padding-bottom: 2px;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--green); border-radius: 1px;
  transition: width var(--dur-base) var(--ease);
}
.main-nav a:hover        { color: var(--text); }
.main-nav a:hover::after { width: 100%; }
.main-nav a.active       { color: var(--green); }
.main-nav a.active::after { width: 100%; }

.nav-cta {
  background: var(--green-soft) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 999px !important;
  padding: 0.42rem 1.1rem !important;
  color: var(--green) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
.nav-cta:hover {
  background: rgba(74,222,128,0.14) !important;
  border-color: var(--green-muted) !important;
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.mobile-menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid transparent; cursor: pointer;
  padding: 0.5rem 0.55rem; border-radius: var(--radius);
  transition: border-color var(--dur-base) var(--ease);
  width: 42px; height: 42px;
}
.mobile-menu-toggle:hover { border-color: var(--border-2); }
.burger-line {
  display: block; width: 22px; height: 2px;
  background: var(--text-2); border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
/* Animated X when open */
.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.mobile-menu-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── BREADCRUMB ── */
.breadcrumb-nav {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0.42rem 0;
}
.breadcrumb-list {
  display: flex; align-items: center; gap: 0.4rem;
  list-style: none; font-size: 0.76rem; color: var(--text-3);
}
.breadcrumb-list a { color: var(--text-3); text-decoration: none; transition: color var(--dur-base) var(--ease); }
.breadcrumb-list a:hover { color: var(--green); }
.bc-sep { color: var(--border-2); }

/* ── EDITION BAR ── */
.edition-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  height: var(--bar-h);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  display: flex;
  align-items: center;
}
.edition-bar-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; height: 100%;
}
.edition-explain {
  font-size: 0.74rem; color: var(--text-3);
  display: flex; align-items: center; gap: 0.5rem;
}
.live-badge {
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--green); letter-spacing: 0.06em;
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.edition-toggle {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; flex-shrink: 0;
}
.edition-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; background: transparent;
  border: none; border-right: 1px solid var(--border);
  color: var(--text-3); font-family: var(--sans);
  font-size: 0.78rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: var(--transition);
}
.edition-tab:last-child { border-right: none; }
.edition-tab:hover  { color: var(--text-2); background: var(--bg-3); }
.edition-tab.active { background: rgba(74,222,128,0.08); color: var(--green); }
.ed-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-java    { background: var(--cyan); }
.dot-bedrock { background: var(--gold); }
.dot-all     { background: var(--green); }

/* ── LAYOUT + SIDEBAR ── */
.layout { display: flex; flex: 1; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  position: sticky;
  top: var(--sticky-top);
  height: calc(100vh - var(--sticky-top));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.sidebar-header-row {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-title {
  font-family: var(--pixel); font-size: 0.46rem;
  color: var(--text-3); letter-spacing: 0.2em;
  text-transform: uppercase;
}

.search-box { position: relative; }
.search-box svg {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%); color: var(--text-3); pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.1rem;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.84rem;
  transition: var(--transition);
}
.search-input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px var(--mc-glow);
}
.search-input::placeholder { color: var(--text-3); }

.filter-section { display: flex; flex-direction: column; gap: 0.5rem; }
.filter-section-tags { flex: 1; min-height: 0; }

.filter-section-label {
  font-size: 0.44rem; font-family: var(--pixel);
  color: var(--text-3); letter-spacing: 0.15em;
  text-transform: uppercase;
}

.edition-filters { display: flex; flex-direction: column; gap: 0.28rem; }
.edition-btn {
  padding: 0.48rem 0.75rem; background: transparent;
  border: 1px solid var(--border); color: var(--text-2);
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; border-radius: var(--radius);
  text-align: left; display: flex; align-items: center; gap: 0.55rem;
  transition: var(--transition);
}
.edition-btn:hover { border-color: var(--border-2); color: var(--text); }
.edition-btn.active-all     { border-color: var(--green);  color: var(--green);  background: rgba(74,222,128,0.07); }
.edition-btn.active-java    { border-color: var(--cyan);   color: var(--cyan);   background: rgba(34,211,238,0.07); }
.edition-btn.active-bedrock { border-color: var(--gold);   color: var(--gold);   background: rgba(245,158,11,0.07); }

.edition-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.filter-group { display: flex; flex-direction: column; gap: 0.18rem; overflow-y: auto; }
.filter-label {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.36rem 0.5rem; cursor: pointer; border-radius: var(--radius);
  font-size: 0.81rem; color: var(--text-2);
  transition: var(--transition);
}
.filter-label:hover { background: var(--bg-3); color: var(--text); }

.filter-checkbox {
  appearance: none; width: 15px; height: 15px;
  border: 1px solid var(--border-2); background: var(--bg);
  border-radius: 3px; cursor: pointer; flex-shrink: 0; position: relative;
  transition: var(--transition);
}
.filter-checkbox:checked { background: var(--green); border-color: var(--green); }
.filter-checkbox:checked::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%); color: var(--bg); font-size: 9px; font-weight: 700;
}
.filter-tag-name { flex: 1; }
.filter-count {
  font-size: 0.64rem; color: var(--text-3); background: var(--bg-3);
  border: 1px solid var(--border); padding: 0.06rem 0.36rem;
  border-radius: 10px; min-width: 22px; text-align: center;
  font-family: var(--mono);
}

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.45rem; padding-top: 1rem; }
.status-legend {
  display: flex; gap: 1rem; font-size: 0.73rem; color: var(--text-3);
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
  margin-bottom: 0.2rem; align-items: center;
}
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.3rem; }
.online-dot  { background: var(--green); }
.offline-dot { background: var(--danger); }

.reset-btn {
  padding: 0.5rem 1rem; background: transparent;
  border: 1px solid var(--border); color: var(--text-3);
  font-family: var(--sans); font-size: 0.8rem; cursor: pointer;
  border-radius: var(--radius); width: 100%;
  transition: var(--transition); text-align: center;
}
.reset-btn:hover { border-color: var(--border-2); color: var(--text-2); background: var(--bg-3); }
.refresh-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.close-mobile-btn {
  display: none;
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.25);
  color: var(--danger);
}
.close-mobile-btn:hover {
  background: rgba(248,113,113,0.14);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── MAIN ── */
.main {
  flex: 1; padding: 2rem 2rem 3rem;
  min-width: 0; display: flex; flex-direction: column; gap: 1.2rem;
}

.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(74,222,128,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.page-header-text { position: relative; }

.page-title {
  font-family: var(--pixel); font-size: 0.72rem;
  color: var(--green); letter-spacing: 0.08em; line-height: 1.6;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 24px rgba(74,222,128,0.35);
}
.page-subtitle { font-size: 0.88rem; color: var(--text-2); margin-bottom: 0.3rem; }
.page-count { font-size: 0.79rem; color: var(--text-3); font-family: var(--mono); }
.page-count strong { color: var(--green); }

.header-stats { display: flex; gap: 0.75rem; align-items: center; position: relative; }
.stat-pill {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0.6rem 1rem;
  min-width: 72px;
}
.stat-num {
  font-family: var(--mono); font-size: 1.2rem; font-weight: 700;
  color: var(--green); line-height: 1;
}
.stat-lbl {
  font-size: 0.6rem; color: var(--text-3); margin-top: 0.2rem;
  text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--mono);
}

.sort-bar {
  display: flex; align-items: center; gap: 0.65rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.sort-label { font-size: 0.8rem; color: var(--text-3); white-space: nowrap; }
.sort-select {
  padding: 0.4rem 0.85rem; background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text);
  font-family: var(--sans); font-size: 0.82rem; border-radius: var(--radius);
  cursor: pointer; transition: var(--transition);
}
.sort-select:hover { border-color: var(--border-2); }
.sort-select:focus { outline: none; border-color: var(--green); }

.filter-sort-btn {
  display: none;
  align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--sans); font-size: 0.82rem;
  font-weight: 500; cursor: pointer; border-radius: var(--radius);
  transition: var(--transition); white-space: nowrap;
}
.filter-sort-btn:hover { border-color: var(--green); color: var(--green); }
.filter-sort-btn.active { background: var(--green-soft); border-color: var(--green); color: var(--green); }

.table-header {
  display: grid;
  grid-template-columns: 42px 1fr 130px 200px;
  padding: 0.48rem 1rem;
  font-size: 0.6rem; font-family: var(--pixel);
  color: var(--text-3); letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.th-rank    { text-align: center; }
.th-players { text-align: center; }
.th-ip      { text-align: right; }

.server-list { display: flex; flex-direction: column; gap: 0.38rem; }

/* Skeleton */
.skeleton-row {
  height: 72px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Server row */
.server-row {
  display: grid;
  grid-template-columns: 42px 1fr 130px 200px;
  align-items: center;
  min-height: 72px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  padding: 0 1rem 0 calc(1rem - 2px);
  gap: 0.5rem;
  transition:
    border-color var(--dur-base) var(--ease),
    background    var(--dur-base) var(--ease),
    transform     var(--dur-base) var(--ease),
    box-shadow    var(--dur-base) var(--ease);
}
.server-row:hover {
  border-color: var(--border-2);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.server-row.online { border-left-color: rgba(74,222,128,0.5); }
.server-row.online:hover { border-left-color: rgba(74,222,128,0.7); border-color: rgba(74,222,128,0.22); }

.row-rank { text-align: center; font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.row-info { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }

.row-icon {
  width: 48px; height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease);
}
.row-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.server-row:hover .row-icon { transform: scale(1.06); }

.row-text { flex: 1; min-width: 0; }
.row-name-line {
  display: flex; align-items: center; gap: 0.45rem;
  flex-wrap: nowrap; margin-bottom: 0.18rem; overflow: hidden;
}
.row-name {
  font-weight: 600; font-size: 0.91rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.row-desc {
  font-size: 0.76rem; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.28rem; max-width: 440px;
}
.row-tags { display: flex; gap: 0.28rem; flex-wrap: wrap; align-items: center; }
.row-tag {
  font-size: 0.6rem; padding: 0.1rem 0.42rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-3); border-radius: 4px;
  font-family: var(--mono); white-space: nowrap;
}

.edition-badge {
  font-family: var(--mono); font-size: 0.56rem;
  letter-spacing: 0.06em; padding: 0.14rem 0.44rem;
  border-radius: 4px; font-weight: 600; flex-shrink: 0;
}
.badge-java    { background: rgba(34,211,238,0.1);  color: var(--cyan);  border: 1px solid rgba(34,211,238,0.25); }
.badge-bedrock { background: rgba(245,158,11,0.1);  color: var(--gold);  border: 1px solid rgba(245,158,11,0.25); }
.badge-both    { background: rgba(74,222,128,0.1);  color: var(--green); border: 1px solid rgba(74,222,128,0.25); }

/* Status dot — BUG FIX: .loading state was missing */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  transition: background var(--dur-slow) var(--ease);
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 6px rgba(74,222,128,0.55); }
.status-dot.offline { background: var(--danger); }
.status-dot.loading { background: var(--border-2); animation: dot-pulse 1.2s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.row-players { text-align: center; font-family: var(--mono); font-size: 0.78rem; padding: 0 0.5rem; }
.players-online  { color: var(--green); font-weight: 600; }
.players-offline { color: var(--text-3); }
.players-loading {
  display: inline-block; width: 50px; height: 10px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-3) 50%, var(--bg-elevated) 75%);
  border-radius: 4px;
  animation: shimmer 1.4s infinite linear;
  background-size: 200% 100%;
}

.row-ip { display: flex; align-items: center; justify-content: flex-end; }
.copy-btn {
  display: flex; align-items: center; gap: 0.42rem;
  padding: 0.42rem 0.85rem;
  background: rgba(74,222,128,0.06);
  border: 1px solid var(--border-2);
  color: var(--green); border-radius: var(--radius);
  cursor: pointer; font-family: var(--mono); font-size: 0.71rem;
  transition: var(--transition); white-space: nowrap;
}
.copy-btn:hover { background: rgba(74,222,128,0.14); border-color: var(--green); }
.copy-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
.copy-btn .addr {
  max-width: 118px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--text-2);
}

/* Mobile bottom bar — hidden on desktop */
.row-mobile-bottom { display: none; }

.state-msg {
  padding: 3rem 1.5rem; text-align: center;
  color: var(--text-3); font-size: 0.9rem; display: flex;
  flex-direction: column; align-items: center; gap: 0.75rem;
}
.state-icon { font-size: 2.5rem; }

.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 0.5rem;
}
.page-btn {
  padding: 0.52rem 1.2rem; background: var(--bg-card);
  border: 1px solid var(--border); color: var(--text-2);
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; border-radius: var(--radius);
  transition: var(--transition);
}
.page-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 0.79rem; color: var(--text-3); font-family: var(--mono); white-space: nowrap; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--bg-elevated); border: 1px solid var(--border-2);
  color: var(--green); font-family: var(--mono); font-size: 0.8rem;
  padding: 0.6rem 1.2rem; border-radius: var(--radius-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
  z-index: 999; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile filter FAB */
.mobile-filter-fab {
  display: none;
  position: fixed; bottom: 1.5rem; right: 1.25rem;
  background: var(--green); color: var(--bg);
  border: none; padding: 0.65rem 1.1rem;
  font-family: var(--pixel); font-size: 0.44rem; letter-spacing: 0.05em;
  border-radius: 999px; cursor: pointer; z-index: 80;
  box-shadow: 0 4px 20px rgba(74,222,128,0.4);
  transition: var(--transition);
  align-items: center; gap: 0.4rem;
}
.mobile-filter-fab:hover { background: var(--green-dim); transform: scale(1.04); }

/* Sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 140;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* ── SEO BLOCK ── */
.seo-block {
  margin-top: 1.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.seo-block h2 {
  font-size: 1.12rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em;
}
.seo-block h3 {
  font-size: 0.93rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.35rem;
}
.seo-block p { font-size: 0.87rem; color: var(--text-3); line-height: 1.78; }
.seo-block strong { color: var(--text-2); }

.seo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.seo-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem;
  transition: border-color var(--dur-base) var(--ease);
}
.seo-card:hover { border-color: var(--border-2); }
.seo-card h3 { font-size: 0.82rem; margin-bottom: 0.4rem; }
.seo-card p  { font-size: 0.78rem; color: var(--text-3); line-height: 1.6; margin: 0; }

.seo-steps { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.45rem; }
.seo-steps li { font-size: 0.86rem; color: var(--text-3); }
.seo-steps li strong { color: var(--text-2); }

.seo-faq { display: flex; flex-direction: column; gap: 0.75rem; }
.seo-faq dt { font-size: 0.88rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.15rem; }
.seo-faq dd { font-size: 0.84rem; color: var(--text-3); line-height: 1.65; }

/* ── FOOTER ── */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: auto; }
.footer-inner-grid {
  display: grid; grid-template-columns: 1.8fr 1fr 1fr;
  gap: 3rem; padding: 3rem 0 2.5rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-logo {
  font-family: var(--pixel); font-size: 0.68rem;
  color: var(--green); letter-spacing: 0.1em;
  text-shadow: 0 0 12px rgba(74,222,128,0.4);
}
.footer-brand p { font-size: 0.84rem; color: var(--text-3); line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-family: var(--pixel); font-size: 0.46rem;
  color: var(--text-2); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
  font-size: 0.84rem; color: var(--text-3);
  text-decoration: none; transition: color var(--dur-base) var(--ease);
}
.footer-col a:hover { color: var(--green); }

.footer-bottom-bar { border-top: 1px solid var(--border); padding: 1rem 0; background: rgba(5,12,5,0.6); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-bottom-inner small { font-size: 0.76rem; color: var(--text-3); }

/* ── RESPONSIVE ── */
@media (min-width: 1400px) {
  .container { max-width: 1360px; }
  .sidebar   { width: 290px; min-width: 290px; }
}

@media (max-width: 1024px) {
  .main { padding: 1.5rem 1.5rem 3rem; }
  .seo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet ≤ 900px — sidebar becomes overlay */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 150; transform: translateX(-110%);
    transition: transform var(--dur-base) var(--ease);
    height: 100vh; width: min(var(--sidebar-w), 88vw);
    min-width: 0;
    box-shadow: 4px 0 32px rgba(0,0,0,0.6);
    padding-top: 1rem;
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 1.25rem 1rem 5rem; }
  .filter-sort-btn { display: flex; }
  .close-mobile-btn { display: block !important; width: 100%; }
  .table-header { display: none; }

  .server-row {
    display: flex; flex-direction: column;
    padding: 0; gap: 0; align-items: stretch; min-height: unset;
    border-left-width: 3px;
  }
  .server-row:hover { transform: none; }
  .row-rank    { display: none; }
  .row-players { display: none; }
  .row-ip      { display: none; }

  .row-info {
    flex-direction: row; align-items: flex-start; gap: 0.7rem;
    padding: 0.85rem 0.9rem 0.7rem; width: 100%; min-width: 0;
  }
  .row-icon { width: 46px; height: 46px; font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
  .row-text { flex: 1; min-width: 0; }
  .row-name  { font-size: 0.87rem; }
  .row-desc  { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .row-tag   { font-size: 0.58rem; }

  .row-mobile-bottom {
    display: flex; align-items: center;
    justify-content: space-between; gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
  }
  .row-mobile-bottom > div {
    font-size: 0.71rem; font-family: var(--mono);
    display: flex; align-items: center; gap: 0.3rem;
  }
  .row-mobile-bottom .copy-btn {
    padding: 0.36rem 0.65rem; font-size: 0.67rem;
    max-width: 170px; border-radius: 6px;
  }
  .row-mobile-bottom .copy-btn .addr { max-width: 110px; }

  /* Show FAB */
  .mobile-filter-fab { display: flex; }

  .footer-inner-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-brand p { max-width: 100%; }
  .footer-col ul { align-items: center; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .seo-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile nav ≤ 768px */
@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }

  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(5,12,5,0.98); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem; visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease), visibility var(--dur-base) var(--ease);
    border-bottom: 1px solid var(--border); z-index: 199;
  }
  .main-nav.open { visibility: visible; opacity: 1; pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 1rem; align-items: stretch; }
  .main-nav a  { display: block; text-align: center; padding: 0.55rem 0; font-size: 0.9rem; }
  .nav-cta     { text-align: center; }
  .edition-explain { display: none; }

  .page-header { flex-direction: column; gap: 0.75rem; padding: 1.25rem; }
  .header-stats { align-self: flex-start; }
  .seo-block { padding: 1.5rem 1.25rem; }
  .seo-grid  { grid-template-columns: 1fr; }
}

/* Small ≤ 640px */
@media (max-width: 640px) {
  .main { padding: 1rem 0.875rem 5rem; }
  .server-list { gap: 0.45rem; }
  .server-row  { border-radius: 10px; }
  .row-info    { padding: 0.75rem 0.8rem 0.6rem; gap: 0.6rem; }
  .row-icon    { width: 42px; height: 42px; font-size: 1.1rem; }
  .row-name    { font-size: 0.84rem; }
  .row-desc    { font-size: 0.72rem; }
  .row-tag     { font-size: 0.56rem; }
  .row-mobile-bottom { padding: 0.45rem 0.8rem; }
  .pagination  { gap: 0.5rem; }
  .page-btn    { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
  .page-info   { font-size: 0.72rem; }
  .toast       { white-space: normal; max-width: 90%; text-align: center; font-size: 0.75rem; }
  .page-title  { font-size: 0.58rem; }
  .mobile-filter-fab { bottom: 1rem; right: 1rem; }
  .seo-grid    { grid-template-columns: 1fr; }
}

/* Extra small ≤ 480px */
@media (max-width: 480px) {
  .container { padding: 0 0.875rem; }
  .sidebar   { padding: 0.875rem; }
  .sidebar-title { font-size: 0.38rem; }
  .filter-section-label { font-size: 0.38rem; }
  .row-icon  { width: 38px; height: 38px; font-size: 1rem; border-radius: 5px; }
  .row-name  { font-size: 0.8rem; }
  .footer-col h4 { font-size: 0.38rem; }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  .copy-btn, .edition-tab, .edition-btn { min-height: 42px; }
  .filter-label { min-height: 40px; }
  .server-row:hover { transform: none; box-shadow: none; background: var(--bg-card); }
  .server-row:hover .row-icon { transform: none; }
  .server-row:active { opacity: 0.8; }
}

/* Prevent scroll when menus open */
body.menu-open   { overflow: hidden; }
body.sidebar-open { overflow: hidden; }

/* Overflow guard */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  img, video, iframe, canvas { max-width: 100%; }
}
