/* ============================================================
   LIVE PLAYERS PAGE STYLES
   Depends on: main.css (CSS variables, reset, header, footer, loading)
============================================================ */

/* ===== LIVE BADGE (inside shared hero) ===== */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 8px 16px;
  background: rgba(227, 74, 47, 0.12);
  border: 2px solid rgba(227, 74, 47, 0.45);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  color: #FF6B4A;
  text-transform: uppercase;
}
.live-badge .live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FF4A2F;
  box-shadow: 0 0 9px rgba(227, 74, 47, 0.9);
  animation: liveBlink 1.4s ease-in-out infinite;
}
.live-badge.is-offline {
  background: rgba(136, 136, 136, 0.1);
  border-color: rgba(136, 136, 136, 0.4);
  color: var(--text-muted);
}
.live-badge.is-offline .live-dot {
  background: var(--stone);
  box-shadow: none;
  animation: none;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.82); }
}

.live-updated {
  display: block;
  margin-top: 14px;
  font-family: var(--font-vt);
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

/* ===== MAIN LAYOUT ===== */
.live-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ===== SHARED PANEL ===== */
.live-panel {
  background: var(--night-panel);
  border: 4px solid #000;
  box-shadow:
    inset 3px 3px 0 var(--panel-hi),
    inset -3px -3px 0 var(--panel-sh),
    7px 7px 0 rgba(0, 0, 0, 0.5);
}

/* ===== OFFLINE BANNER ===== */
.live-offline-banner {
  display: none;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  margin-bottom: 32px;
  padding: 18px 26px;
  background: rgba(227, 74, 47, 0.1);
  border: 3px solid rgba(227, 74, 47, 0.4);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.7;
  color: #FF8A6F;
}
.live-offline-banner.show { display: flex; }
.live-offline-banner i { font-size: 1.2rem; }

/* ===== HERO COUNT PANEL ===== */
.live-count-panel {
  padding: 44px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.live-count-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(92, 201, 30, 0.16), transparent 65%);
  pointer-events: none;
}
.live-count-label {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.live-count-value {
  font-family: var(--font-pixel);
  font-size: clamp(48px, 12vw, 96px);
  line-height: 1;
  color: var(--accent-green);
  text-shadow:
    4px 4px 0 #000,
    0 0 26px rgba(92, 201, 30, 0.55);
}
.live-count-value.is-offline {
  color: var(--stone);
  text-shadow: 4px 4px 0 #000;
}
.live-count-max {
  display: block;
  margin-top: 16px;
  font-family: var(--font-vt);
  font-size: 1.6rem;
  color: var(--text-sand);
  letter-spacing: 1px;
}

/* capacity bar */
.live-capacity {
  max-width: 420px;
  margin: 24px auto 0;
  height: 22px;
  background: #0B0F1A;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px #1A2233;
  padding: 3px;
}
.live-capacity-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--btn-green), var(--accent-aqua));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== STAT TILES ===== */
.live-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.live-stat {
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.live-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 #000;
  font-size: 1.35rem;
}
.icon-ping  { background: #1A4A6A; color: #4ACBE3; }
.icon-tps   { background: #2A5F3A; color: #7EDA4A; }
.icon-peak  { background: #7A2E10; color: #F4823A; }
.icon-uptime{ background: #4A2A6A; color: #B58AE8; }

.live-stat-value {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--text-white);
  text-shadow: 2px 2px 0 #000;
  line-height: 1.4;
}
.live-stat-value.good { color: var(--accent-green); }
.live-stat-value.warn { color: var(--accent-gold); }
.live-stat-value.bad  { color: var(--accent-red); }
.live-stat-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* ===== GRAPH PANEL ===== */
.live-graph-panel {
  margin-top: 28px;
  padding: 32px 34px 28px;
}
.live-graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.live-graph-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text-sand);
  text-shadow: 3px 3px 0 #000;
  line-height: 1.7;
}

/* range toggle */
.live-range-toggle {
  display: inline-flex;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}
.live-range-btn {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  border-right: 2px solid #000;
  transition: background 0.12s, color 0.12s;
}
.live-range-btn:last-child { border-right: none; }
.live-range-btn:hover { background: rgba(255, 255, 255, 0.1); }
.live-range-btn.active {
  background: linear-gradient(180deg, var(--btn-green-hi) 0%, var(--btn-green) 100%);
  color: #fff;
}

.live-chart-wrap {
  position: relative;
  height: 300px;
}

/* window summary (peak / avg / low) */
.live-window-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.live-window-stat {
  text-align: center;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
}
.live-window-stat .wval {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--text-white);
  text-shadow: 2px 2px 0 #000;
}
.live-window-stat .wlabel {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ===== ONLINE PLAYERS ===== */
.live-players-panel {
  margin-top: 28px;
  padding: 32px 34px;
}
.live-players-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
}
.live-players-head h2 {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text-sand);
  text-shadow: 3px 3px 0 #000;
}
.live-players-count {
  font-family: var(--font-vt);
  font-size: 1.3rem;
  color: var(--accent-green);
}
.live-player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.live-player-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.09);
}
.live-player-chip img {
  width: 30px;
  height: 30px;
  border: 2px solid #000;
  image-rendering: pixelated;
  background: #1A2233;
}
.live-player-chip span {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-players-empty {
  font-family: var(--font-vt);
  font-size: 1.3rem;
  color: var(--text-muted);
  padding: 8px 0;
}

/* ===== CONNECT CTA ===== */
.live-cta {
  margin-top: 28px;
  padding: 38px 34px;
  text-align: center;
}
.live-cta h2 {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text-sand);
  text-shadow: 3px 3px 0 #000;
  line-height: 1.8;
  margin-bottom: 12px;
}
.live-cta p {
  font-family: var(--font-body);
  color: #9ABEDC;
  font-size: 0.98rem;
  margin-bottom: 22px;
}
.live-cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== SHARED BUTTONS (mirrors status.css) ===== */
.mc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  font-family: var(--font-pixel);
  font-size: 9px;
  cursor: pointer;
  transition: box-shadow 0.1s, transform 0.1s, background 0.15s;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.mc-btn:hover  { box-shadow: 2px 2px 0 #000; transform: translate(2px, 2px); }
.mc-btn:active { box-shadow: 0 0 0 #000; transform: translate(4px, 4px); }
.mc-btn-copy {
  background: linear-gradient(180deg, var(--btn-green-hi) 0%, var(--btn-green) 50%, var(--btn-green-dk) 100%);
  color: #fff;
}
.mc-btn-copy.success { background: #2E6010; }
.mc-btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sand);
  border-color: rgba(255, 255, 255, 0.15);
}
.mc-btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

/* ===== FADE-UP ===== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.in-view {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .live-main { padding: 0 16px 60px; }
  .live-count-panel { padding: 32px 20px; }
  .live-graph-panel,
  .live-players-panel,
  .live-cta { padding: 24px 20px; }
  .live-chart-wrap { height: 240px; }
  .live-graph-header { flex-direction: column; align-items: flex-start; }
  .live-window-stats { grid-template-columns: 1fr; }
}
