/* ==============================================================================
   WOOWMAP STRATEGY – Compact 3-Column Instance Selection Stylesheet (/play/)
   Matching 100% of the Homepage Command-Center & Simulation Aesthetic.
   Desktop fits 3 columns within 100vh with NO vertical scrolling.
   ============================================================================== */

:root {
  --bg-deep: #05080c;
  --bg-topbar: #030508;
  --bg-navbar: rgba(8, 12, 18, 0.94);
  --bg-card: rgba(14, 22, 36, 0.88);
  --bg-card-hover: rgba(20, 32, 52, 0.96);
  --bg-card-muted: rgba(10, 16, 26, 0.75);
  --bg-spec-row: rgba(7, 11, 18, 0.65);
  
  --border-subtle: rgba(56, 189, 248, 0.14);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.35);

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #0ea5e9;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-purple: #c084fc;
  --accent-red: #ef4444;

  --topbar-height: 28px;
  --navbar-height: 56px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(2, 132, 199, 0.12);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 5px;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==============================================================================
   1. Map Background (Non-interactive)
   ============================================================================== */

.map-background-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border: 0;
  margin: 0;
  padding: 0;
  z-index: 0;
  pointer-events: none !important;
  user-select: none !important;
  background: #070b0f;
  overflow: hidden;
}

.map-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none !important;
  background: #070b0f;
}

.map-background * {
  pointer-events: none !important;
  user-select: none !important;
}

.leaflet-container {
  background: #080d14 !important;
}

.leaflet-control-zoom,
.leaflet-control-attribution {
  display: none !important;
}

.map-vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(5, 8, 12, 0.3) 0%, rgba(5, 8, 12, 0.85) 100%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.85) 0%, rgba(3, 5, 8, 0.4) 30%, rgba(3, 5, 8, 0.5) 70%, rgba(3, 5, 8, 0.95) 100%);
}

/* ==============================================================================
   2. Site Container & Top Navigation Bars
   ============================================================================== */

.site-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Slim Top Live Bar */
.top-live-bar {
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  z-index: 20;
}

.top-bar-left,
.top-bar-center,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1.5px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.alpha-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.live-dot-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
  animation: pulse-glow 2s infinite ease-in-out;
}

.version-tag {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  padding: 1.5px 6px;
  border-radius: 3px;
  font-size: 10px;
}

/* Top Bar Dot & Status Pill */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.status-dot.healthy, .status-dot.online { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.status-dot.degraded, .status-dot.connecting { background: var(--accent-yellow); box-shadow: 0 0 6px var(--accent-yellow); }
.status-dot.offline, .status-dot.error { background: var(--accent-red); box-shadow: 0 0 6px var(--accent-red); }
.status-dot.pulse-yellow { animation: status-blink 1.2s infinite ease-in-out; }

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.metric-chip strong {
  color: var(--text-main);
  font-weight: 700;
}

.metric-chip small {
  color: var(--text-dim);
}

/* Clickable Serverstatus Pill & Popover Dropdown */
.server-status-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.server-status-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2.5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.server-status-pill-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.server-status-pill-btn[aria-expanded="true"] {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.server-status-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}

.status-label-top {
  font-family: var(--font-mono);
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.status-label-main {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Server Status Popover Dropdown (Positioned below entire header: topbar + navbar + 10px spacing) */
.server-status-popover {
  position: fixed;
  top: calc(var(--topbar-height) + var(--navbar-height) + 10px);
  right: 24px;
  width: 320px;
  max-height: calc(100vh - var(--topbar-height) - var(--navbar-height) - 24px);
  overflow-y: auto;
  background: #080d16;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.92), 0 0 25px rgba(2, 132, 199, 0.25);
  padding: 12px;
  z-index: 60;
  animation: popover-drop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
}

.server-status-popover.hidden {
  display: none !important;
}

.status-popover-header {
  margin-bottom: 6px;
}

.status-popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-popover-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.status-popover-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.status-popover-badge.online, .status-popover-badge.healthy {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-popover-badge.connecting, .status-popover-badge.degraded {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-popover-badge.offline, .status-popover-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-popover-time {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  display: block;
  margin-top: 1px;
}

.status-popover-summary-bar {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 5px;
  margin-bottom: 6px;
  text-align: center;
}

.status-popover-summary-bar.online, .status-popover-summary-bar.healthy {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-popover-summary-bar.connecting, .status-popover-summary-bar.degraded {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-popover-summary-bar.offline, .status-popover-summary-bar.error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-popover-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.status-popover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 7px;
  background: rgba(14, 22, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}

.status-popover-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-popover-comp-name {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.status-popover-comp-meta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
}

.status-popover-row-right {
  text-align: right;
}

.status-popover-comp-state {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
}

.status-popover-comp-state.online, .status-popover-comp-state.healthy { color: var(--accent-green); }
.status-popover-comp-state.connecting, .status-popover-comp-state.degraded { color: var(--accent-yellow); }
.status-popover-comp-state.offline, .status-popover-comp-state.error { color: var(--accent-red); }
.status-popover-comp-state.unknown { color: var(--text-muted); }

.status-popover-comp-desc {
  font-size: 9px;
  color: var(--text-muted);
}

/* Header Clock (Game Matching TT.MM.JJJJ · HH:MM:SS) */
.header-clock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.header-clock .clock-icon {
  font-size: 10px;
  opacity: 0.85;
}

.header-clock .clock-val {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Main Navigation Bar */
.main-navbar {
  height: var(--navbar-height);
  background: var(--bg-navbar);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 30;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.brand-bold {
  color: var(--accent-cyan);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
}

/* Back Link Button */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-back-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--border-subtle);
  color: var(--accent-cyan);
}

.back-arrow {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.nav-back-btn:hover .back-arrow {
  transform: translateX(-3px);
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ==============================================================================
   3. Compact 3-Column Instance Stage (100vh Fit on Desktop)
   ============================================================================== */

.instance-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vh, 20px) clamp(16px, 2.5vw, 32px);
  z-index: 15;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
}

.stage-header {
  text-align: center;
  max-width: 720px;
  margin-bottom: clamp(10px, 1.6vh, 18px);
  animation: stage-fade-in 0.3s ease-out;
}

.stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 3px;
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.stage-title {
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.15;
}

.stage-desc {
  font-size: clamp(11.5px, 1vw, 13px);
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 3-Column Instance Grid */
.instance-grid {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
  animation: stage-fade-in 0.35s ease-out;
}

/* Base Instance Card */
.instance-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: clamp(12px, 1.6vh, 18px) clamp(12px, 1.2vw, 18px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 320px;
}

.instance-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 24px rgba(56, 189, 248, 0.2);
}

/* Coming Soon Card Modifier */
.instance-card.coming-soon {
  background: var(--bg-card-muted);
  border-color: var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0.88;
}

.instance-card.coming-soon:hover {
  background: rgba(14, 20, 30, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}

.instance-card.loading-card {
  grid-column: 1 / -1;
  min-height: 160px;
  align-items: center;
  justify-content: center;
}

.card-loading-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Card Header */
.card-header-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.inst-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1.5px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.inst-badge.muted {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--text-muted);
}

.inst-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
}

.inst-live-pill.in-prep {
  color: #fbbf24;
}

.inst-live-pill.planned {
  color: var(--accent-purple);
}

.dot-pulse-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-glow 1.5s infinite ease-in-out;
}

.dot-static-yellow {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fbbf24;
}

.dot-static-purple {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-purple);
}

.card-title {
  font-size: 17.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  min-height: 28px;
}

/* Compact Specs List (Key-Value Rows) */
.card-specs-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--bg-spec-row);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.spec-val {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
  white-space: nowrap;
}

.spec-val.accent-cyan {
  color: var(--accent-cyan);
}

.spec-val.accent-green {
  color: #34d399;
}

.spec-val.muted {
  color: var(--text-muted);
  font-weight: 400;
}

/* Card Actions */
.card-action-row {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.inst-join-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  width: 100%;
}

.inst-join-button:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}

.inst-join-button .arrow {
  transition: transform 0.2s ease;
}

.inst-join-button:hover .arrow {
  transform: translateX(3px);
}

.inst-disabled-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-align: center;
  cursor: not-allowed;
  user-select: none;
  pointer-events: none;
  width: 100%;
}

/* ==============================================================================
   4. Animations & Responsive Breakpoints
   ============================================================================== */

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

@keyframes status-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}

@keyframes stage-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popover-drop {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Desktop & Laptop (1366x768 & 1920x1080) -> 3 Columns No Scroll */
@media (min-width: 1024px) {
  .instance-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet (768px - 1023px) -> 2 Columns */
@media (max-width: 1023px) and (min-width: 768px) {
  .top-bar-center {
    display: none;
  }
  .navbar-menu {
    gap: 2px;
  }
  .nav-item {
    font-size: 11px;
    padding: 6px 8px;
  }
  .instance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (<= 767px) -> 1 Column */
@media (max-width: 767px) {
  :root {
    --navbar-height: 52px;
  }
  .top-live-bar {
    padding: 0 12px;
  }
  .status-tag {
    display: none;
  }
  .main-navbar {
    padding: 0 12px;
  }
  .brand-sub {
    display: none;
  }
  .navbar-menu {
    position: fixed;
    top: calc(var(--topbar-height) + var(--navbar-height));
    left: 0;
    right: 0;
    background: rgba(8, 12, 18, 0.98);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 10px;
    gap: 4px;
    display: none;
    z-index: 50;
  }
  .navbar-menu.mobile-open {
    display: flex;
  }
  .nav-item {
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    font-size: 12.5px;
  }
  .hamburger-btn {
    display: flex;
  }
  .instance-stage {
    padding: 14px 12px;
    justify-content: flex-start;
  }
  .stage-title {
    font-size: 18px;
  }
  .stage-desc {
    font-size: 12px;
  }
  .instance-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .server-status-popover {
    top: calc(var(--topbar-height) + var(--navbar-height) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
  }
}
