/* ============================================
   小熊的小家庭 · Cozy Bear Minecraft Theme
   ============================================ */

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

/* ===== Theme Variables (Bear Palette) ===== */
:root {
  /* Bear fur browns */
  --bear-fur: #a0522d;
  --bear-fur-light: #c97a5b;
  --bear-fur-dark: #6b3410;
  --bear-fur-deep: #3e1f0d;

  /* Bear snout peach */
  --bear-snout: #d4a088;
  --bear-snout-light: #e8b59e;
  --bear-snout-dark: #b07858;

  /* Cozy room creams (Minecraft room background) */
  --bg: #faf3e3;
  --bg-soft: #f0e3c8;
  --bg-card: #fffaf0;
  --bg-card-hover: #fff5e1;

  /* Text */
  --text: #3e2723;
  --text-muted: #8b6f47;
  --text-light: #b8a085;

  /* Borders & decoration */
  --border: #e8d4b5;
  --border-strong: #c4a878;
  --pixel-shadow: rgba(107, 52, 16, 0.18);

  /* Semantic */
  --success: #6b8e23;
  --success-bg: #e8efd0;
  --danger: #b85c3d;
  --danger-bg: #f5dccd;
  --warning: #d4a017;

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(160, 82, 45, 0.5);

  /* Shapes */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --pixel: 4px;

  /* Safe areas (iOS notch etc.) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Spacing scale (4-px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Fredoka', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(212, 160, 136, 0.25) 0%, transparent 35%),
    radial-gradient(circle at 88% 82%, rgba(160, 82, 45, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(232, 181, 158, 0.1) 0%, transparent 60%);
}

::selection { background: var(--bear-fur); color: var(--bg-card); }

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bear-fur-dark);
  color: var(--bg-card);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; outline: 3px solid var(--bear-snout-light); outline-offset: 2px; }

/* ===== Focus Styles ===== */
:focus-visible {
  outline: 3px solid var(--bear-fur);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Navbar ===== */
.navbar {
  background: rgba(255, 250, 240, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  box-shadow: 0 2px 0 var(--border), 0 4px 20px var(--pixel-shadow);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bear-fur-dark);
  font-family: 'Silkscreen', 'Fredoka', monospace;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease;
}
.nav-logo:hover { transform: translateX(2px); }

.logo-pixel {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 0 var(--bear-fur-dark));
  animation: bear-bob 3s ease-in-out infinite;
}

.logo-text {
  background: linear-gradient(135deg, var(--bear-fur-dark), var(--bear-fur));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 8px; }

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
  touch-action: manipulation;
}
.nav-link:hover {
  color: var(--bear-fur-dark);
  background: var(--bg-soft);
}
.nav-link.active {
  color: var(--bg-card);
  background: var(--bear-fur);
  border-color: var(--bear-fur-dark);
  box-shadow: 0 3px 0 var(--bear-fur-dark);
}
.nav-link.active:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--bear-fur-dark); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: center;
  padding: 60px 64px 48px;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
  scroll-margin-top: 80px;
}

.hero-grid-pattern {
  position: absolute;
  inset: -60px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(160, 82, 45, 0.04) 38px, rgba(160, 82, 45, 0.04) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(160, 82, 45, 0.04) 38px, rgba(160, 82, 45, 0.04) 40px);
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
}

.hero-bear {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.bear-character {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-card) 100%);
  border: 3px solid var(--bear-fur-dark);
  border-radius: 32px;
  box-shadow:
    0 8px 0 var(--bear-fur-dark),
    0 14px 28px var(--pixel-shadow),
    inset 0 -10px 0 rgba(160, 82, 45, 0.1);
  animation: bear-bob 2.5s ease-in-out infinite;
}

/* CSS ears */
.bear-ear {
  position: absolute;
  top: -30px;
  width: 84px;
  height: 84px;
  background: radial-gradient(circle at 30% 30%, var(--bear-fur-light), var(--bear-fur) 65%, var(--bear-fur-dark));
  border: 3px solid var(--bear-fur-dark);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--bear-fur-deep);
  z-index: 0;
}
.bear-ear::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 22px;
  width: 32px;
  height: 32px;
  background: var(--bear-snout);
  border-radius: 50%;
  opacity: 0.7;
}
.bear-ear-left { left: 26px; }
.bear-ear-right { right: 26px; }

.bear-face {
  position: relative;
  z-index: 1;
  font-size: 9rem;
  line-height: 1;
  filter: drop-shadow(0 4px 0 rgba(160, 82, 45, 0.25));
}

.bear-cheek {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--bear-snout);
  border-radius: 50%;
  opacity: 0.55;
  z-index: 1;
}
.bear-cheek-left { bottom: 72px; left: 44px; }
.bear-cheek-right { bottom: 72px; right: 44px; }

.bear-shadow {
  width: 260px;
  height: 28px;
  background: radial-gradient(ellipse, rgba(62, 39, 35, 0.25) 0%, transparent 70%);
  margin-top: -20px;
  animation: shadow-pulse 2.5s ease-in-out infinite;
}

@keyframes bear-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes shadow-pulse {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  50% { transform: scaleX(0.85); opacity: 0.4; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 2px solid var(--bear-fur);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--bear-fur-dark);
  letter-spacing: 1px;
  margin-bottom: 20px;
  box-shadow: 0 3px 0 var(--bear-fur-dark);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--bear-fur);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: 'Silkscreen', 'Press Start 2P', monospace;
  font-size: 4.2rem;
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 1px;
  text-wrap: balance;
}

.title-pixel {
  display: inline-block;
  color: var(--bear-fur-dark);
  text-shadow: 4px 4px 0 var(--bear-snout), 8px 8px 0 rgba(160, 82, 45, 0.15);
}
.title-pixel-accent {
  color: var(--bear-fur);
  text-shadow: 4px 4px 0 var(--bear-snout-light), 8px 8px 0 rgba(160, 82, 45, 0.15);
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 500;
  max-width: 560px;
  position: relative;
  padding-left: 16px;
  text-wrap: pretty;
}
.hero-tagline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: linear-gradient(to bottom, var(--bear-fur), var(--bear-snout));
  border-radius: 2px;
}

/* IP Card */
.hero-ip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px 12px 18px;
  margin-bottom: 32px;
  box-shadow: 0 5px 0 var(--border-strong), 0 8px 24px var(--pixel-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-ip:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--border-strong), 0 10px 28px var(--pixel-shadow); }

.ip-icon {
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-dot 2s ease-in-out infinite;
}

.ip-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.ip-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Silkscreen', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ip-value {
  font-family: 'VT323', 'Consolas', monospace;
  font-size: 1.5rem;
  color: var(--bear-fur-dark);
  background: none;
  padding: 0;
  font-weight: 700;
  letter-spacing: 1px;
}

.ip-copy {
  background: var(--bear-fur);
  border: 2px solid var(--bear-fur-dark);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 3px 0 var(--bear-fur-dark);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.ip-copy:hover { background: var(--bear-fur-light); }
.ip-copy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bear-fur-dark); }
.copy-icon {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  border: 2px solid transparent;
  letter-spacing: 0.3px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary {
  background: var(--bear-fur);
  color: var(--bg-card);
  border-color: var(--bear-fur-dark);
  box-shadow: 0 4px 0 var(--bear-fur-dark), 0 8px 20px rgba(160, 82, 45, 0.3);
}
.btn-primary:hover { background: var(--bear-fur-light); transform: translateY(-2px); box-shadow: 0 6px 0 var(--bear-fur-dark), 0 10px 24px rgba(160, 82, 45, 0.4); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bear-fur-dark); }
.btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  background: var(--bg-card);
  color: var(--bear-fur-dark);
  border-color: var(--border-strong);
  box-shadow: 0 4px 0 var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: 0 6px 0 var(--border-strong); }
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--border-strong); }

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 40px;
  background: rgba(255, 250, 240, 0.6);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  width: 100%;
  max-width: 680px;
}

.stat { text-align: center; }
.stat-num {
  font-family: 'Silkscreen', monospace;
  font-size: 2rem;
  color: var(--bear-fur-dark);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
#homePlayerCount {
  font-size: 1.4rem;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border-strong);
}

/* ===== Sections ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.section-deco {
  color: var(--bear-fur);
  font-size: 1.2rem;
  letter-spacing: 4px;
}

.section-title {
  font-family: 'Silkscreen', 'Press Start 2P', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--bear-fur-dark);
  letter-spacing: 1px;
  position: relative;
  text-wrap: balance;
}

.features, .join {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5);
  position: relative;
}

/* ===== Card (shadcn-style: one base class for all card variants) ===== */
.card,
.feature-card,
.step {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 260px;
  min-height: 260px;
  max-height: 260px;
  gap: var(--space-2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 0 var(--border), 0 6px 16px var(--pixel-shadow);
  overflow: hidden;
  animation: card-rise 0.6s ease both;
}

.features-grid > .card:nth-child(1),
.join-steps > .card:nth-child(1) { animation-delay: 0.05s; }
.features-grid > .card:nth-child(2),
.join-steps > .card:nth-child(2) { animation-delay: 0.13s; }
.features-grid > .card:nth-child(3),
.join-steps > .card:nth-child(3) { animation-delay: 0.21s; }
.features-grid > .card:nth-child(4),
.join-steps > .card:nth-child(4) { animation-delay: 0.29s; }

@keyframes card-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pixel corner decorations */
.card-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--bear-fur);
  border-radius: 2px;
  pointer-events: none;
}
.corner-tl { top: -2px; left: -2px; border-radius: 4px 0 0 0; }
.corner-tr { top: -2px; right: -2px; border-radius: 0 4px 0 0; }
.corner-bl { bottom: -2px; left: -2px; border-radius: 0 0 0 4px; }
.corner-br { bottom: -2px; right: -2px; border-radius: 0 0 4px 0; }

/* ===== Grid containers (identical, shared rule) ===== */
.features-grid,
.join-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: stretch;
  width: 100%;
}

/* ===== Feature Card & Step Card variants (unified) ===== */
.feature-card:hover,
.step:hover {
  transform: translateY(-6px);
  border-color: var(--bear-fur);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 0 var(--bear-fur), 0 14px 28px rgba(160, 82, 45, 0.25);
}
.feature-card:hover .icon-paw,
.step:hover .icon-paw { opacity: 1; transform: translateY(0); }
.feature-card:hover .feature-icon-wrap,
.step:hover .step-icon-wrap { transform: rotate(-6deg); }
.feature-card:hover .feature-icon,
.step:hover .step-number { transform: scale(1.1); }

/* Shared icon box (feature & step) */
.feature-icon-wrap,
.step-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-3);
  background: linear-gradient(135deg, var(--bg-soft), var(--bear-snout-light));
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: inset 0 -3px 0 rgba(160, 82, 45, 0.15);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.feature-icon,
.step-number {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.icon-paw {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1.5px solid var(--bear-fur);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Shared title & desc */
.feature-title,
.step-title {
  font-family: 'Silkscreen', monospace;
  font-size: 1.05rem;
  color: var(--bear-fur-dark);
  margin-bottom: var(--space-2);
  letter-spacing: 0.5px;
  min-height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-desc,
.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 28ch;
  height: 3em;
  min-height: 3em;
  max-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  -webkit-box-pack: center;
}

.step-number {
  font-family: 'Silkscreen', monospace;
  color: var(--bear-fur-dark);
  font-weight: 700;
  text-shadow: 1px 1px 0 var(--bear-snout);
  font-variant-numeric: tabular-nums;
}

.step-code {
  font-family: 'VT323', monospace;
  color: var(--bear-fur-dark);
  background: var(--bg-soft);
  border: 1.5px solid var(--border-strong);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 2px;
  word-break: break-all;
}

/* ===== Status Page ===== */
.status-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  flex: 1;
  text-align: center;
}

.status-header { margin-bottom: 24px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-title {
  font-family: 'Silkscreen', 'Press Start 2P', monospace;
  font-size: 2.2rem;
  color: var(--bear-fur-dark);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 var(--bear-snout);
  text-wrap: balance;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.status-ip-mono {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--bear-fur-dark);
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  padding: 2px 12px;
  border-radius: 6px;
  display: inline-block;
}

/* Status Card */
.status-card {
  padding: 40px 24px;
  margin-bottom: 20px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
}

.status-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.status-card.online { border-color: var(--success); }
.status-card.online:hover { box-shadow: 0 6px 0 var(--success), 0 10px 24px rgba(107, 142, 35, 0.2); }

.status-card.offline { border-color: var(--danger); }
.status-card.offline:hover { box-shadow: 0 6px 0 var(--danger), 0 10px 24px rgba(184, 92, 61, 0.2); }

.status-result {
  display: block;
  width: 100%;
}

.bear-loader { position: relative; }

.bear-loader-emoji {
  font-size: 4rem;
  line-height: 1;
  animation: bear-bob 1.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 0 rgba(160, 82, 45, 0.2));
}

.loader-paws {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.loader-paws span {
  font-size: 1.2rem;
  animation: paw-tap 1.2s ease-in-out infinite;
  display: inline-block;
}
.loader-paws span:nth-child(2) { animation-delay: 0.2s; }
.loader-paws span:nth-child(3) { animation-delay: 0.4s; }

@keyframes paw-tap {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.loading-text {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* Status Result */
.status-icon {
  font-size: 4.5rem;
  margin-bottom: 16px;
  line-height: 1;
  filter: drop-shadow(0 4px 0 var(--pixel-shadow));
}

.status-text {
  font-family: 'Silkscreen', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.status-text.online-text { color: var(--success); }
.status-text.offline-text { color: var(--danger); }

.status-players {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Status Detail */
.status-detail {
  padding: 28px;
  margin-bottom: 24px;
  text-align: left;
  aspect-ratio: auto;
}

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

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--bear-fur);
  min-width: 0;
}

.detail-item.detail-full { grid-column: 1 / -1; }

.detail-label {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.detail-value {
  font-size: 1rem;
  color: var(--text);
  word-break: break-word;
  font-weight: 500;
  min-width: 0;
}

.detail-value.motd {
  color: var(--bear-fur-dark);
  line-height: 1.5;
  font-style: italic;
  white-space: pre-wrap;
}

/* Player List */
.player-list {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px dashed var(--border-strong);
}

.player-list-title {
  font-family: 'Silkscreen', monospace;
  font-size: 1rem;
  color: var(--bear-fur-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.player-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.player-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bear-snout-light);
  border: 1.5px solid var(--bear-fur);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.88rem;
  color: var(--bear-fur-dark);
  font-weight: 500;
  box-shadow: 0 2px 0 var(--bear-fur);
}

.btn-refresh {
  margin: 24px auto 0;
}

.btn-icon { font-size: 1.1rem; }

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 0 var(--border), 0 6px 16px var(--pixel-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--bear-fur);
  box-shadow: 0 8px 0 var(--bear-fur), 0 12px 24px rgba(160, 82, 45, 0.2);
}

.metric-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.metric-label {
  font-family: 'Silkscreen', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.05rem;
  color: var(--bear-fur-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 8px;
}

.info-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  box-shadow: 0 4px 0 var(--border), 0 6px 16px var(--pixel-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--bear-fur);
  box-shadow: 0 8px 0 var(--bear-fur), 0 12px 24px rgba(160, 82, 45, 0.2);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.info-title {
  font-family: 'Silkscreen', monospace;
  font-size: 0.95rem;
  color: var(--bear-fur-dark);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.info-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 32ch;
}

.info-code {
  font-family: 'VT323', monospace;
  color: var(--bear-fur-dark);
  background: var(--bg-soft);
  border: 1.5px solid var(--border-strong);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: inline-block;
  word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .info-cards { grid-template-columns: 1fr; gap: 16px; }
  .metric-card { padding: 16px 10px; }
  .info-card { padding: 20px 16px; }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: calc(32px + var(--safe-bottom)) 20px 28px;
  border-top: 2px dashed var(--border-strong);
  background: var(--bg-soft);
  margin-top: auto;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--bear-fur) 0 12px, transparent 12px 24px);
}

.footer-paws {
  font-size: 1.2rem;
  letter-spacing: 12px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.footer-main {
  color: var(--bear-fur-dark);
  font-weight: 500;
  margin-bottom: 4px;
  font-family: 'Silkscreen', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: var(--bear-fur);
  border: 2px solid var(--bg-soft);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bear-fur-dark); }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bear-character, .bear-shadow, .logo-pixel, .badge-dot, .ip-icon,
  .bear-loader-emoji, .loader-paws span {
    animation: none !important;
  }
  .card { animation: none !important; opacity: 1; transform: none; }
  .feature-card:hover, .step:hover, .nav-link.active:hover,
  .btn-primary:hover, .btn-ghost:hover, .hero-ip:hover {
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: 32px 24px 40px;
    gap: 24px;
  }
  .bear-character { width: 180px; height: 180px; }
  .bear-face { font-size: 5rem; }
  .bear-ear { width: 46px; height: 46px; top: -16px; }
  .bear-ear::after { width: 18px; height: 18px; top: 10px; left: 10px; }
  .bear-cheek { width: 14px; height: 14px; bottom: 42px; }
  .bear-cheek-left { left: 24px; }
  .bear-cheek-right { right: 24px; }
  .hero-content { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero-tagline { padding-left: 0; }
  .hero-tagline::before { left: 50%; transform: translateX(-50%); width: 32px; height: 3px; top: -10px; bottom: auto; }
  .hero-title { font-size: 2.4rem; }
  .hero-ip { flex-direction: row; }
  .hero-actions { justify-content: center; }
  .hero-stats { margin: 0 auto; padding: 16px 20px; gap: 16px; width: 100%; max-width: 420px; }
  .stat-num { font-size: 1.3rem; }
  #homePlayerCount { font-size: 1.1rem; }
  .features, .join { padding: var(--space-5) var(--space-4); }
  .features-grid, .join-steps { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .card { height: 240px; min-height: 240px; max-height: 240px; }
  .nav-container { padding: 0 16px; }
  .logo-text { font-size: 0.95rem; }
  .nav-link { padding: 8px 12px; font-size: 0.85rem; }
  .features, .join { padding: var(--space-6) var(--space-4); }
  .section-title { font-size: 1.4rem; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .title-pixel-accent { display: inline; }
  .bear-character { width: 150px; height: 150px; }
  .bear-face { font-size: 4.2rem; }
  .bear-ear { width: 38px; height: 38px; top: -12px; }
  .bear-ear::after { width: 14px; height: 14px; top: 9px; left: 9px; }
  .hero-ip { width: 100%; justify-content: flex-start; }
  .ip-value { font-size: 1.2rem; }
  .hero-actions { width: 100%; flex-direction: column; }
  .btn { justify-content: center; }
  .hero-stats { width: 100%; justify-content: space-around; gap: 8px; }
  .stat-num { font-size: 1.1rem; }
  #homePlayerCount { font-size: 0.95rem; }
  .stat-label { font-size: 0.7rem; }
  .features-grid, .join-steps { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .card { height: 220px; min-height: 220px; max-height: 220px; padding: var(--space-4); }
  .feature-icon-wrap, .step-icon-wrap { width: 44px; height: 44px; border-radius: 12px; }
  .feature-icon, .step-number { font-size: 1.5rem; }
  .feature-title, .step-title { font-size: 0.95rem; margin-bottom: 6px; }
  .feature-desc, .step-desc { font-size: 0.82rem; line-height: 1.5; }
  .icon-paw { width: 18px; height: 18px; font-size: 0.7rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.7rem; }
  .section-title { font-size: 1.2rem; }
  .section-header { gap: 10px; }
  .section-deco { font-size: 1rem; }
}
