/* Horizon Theme for CF-Server-Monitor - Flat, Clean & Precision Engineering Style */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  color-scheme: light;
  --bg-color: #f1f5f9;
  --card-bg: #ffffff;
  --card-bg-subtle: #f8fafc;
  --card-bg-hover: #ffffff;
  --primary: #2563eb;
  --primary-rgb: 37, 99, 235;
  --primary-light: rgba(37, 99, 235, 0.08);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --success: #10b981;
  --success-rgb: 16, 185, 129;
  --danger: #ef4444;
  --danger-rgb: 239, 68, 68;
  --warning: #f59e0b;
  --border-color: #e2e8f0;
  --border-hover: #94a3b8;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-pill: 9999px;
  --shadow: none;
  --shadow-hover: none;
  --grid-line: #e2e8f0;
}

:root[data-appearance="dark"] {
  color-scheme: dark;
  --bg-color: #0b0f19;
  --card-bg: #111827;
  --card-bg-subtle: #172033;
  --card-bg-hover: #141c2e;
  --primary: #3b82f6;
  --primary-rgb: 59, 130, 246;
  --primary-light: rgba(59, 130, 246, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --success: #34d399;
  --success-rgb: 52, 211, 153;
  --danger: #f87171;
  --danger-rgb: 248, 113, 113;
  --warning: #fbbf24;
  --border-color: #1e293b;
  --border-hover: #334155;
  --shadow: none;
  --shadow-hover: none;
  --grid-line: #1e293b;
}

/* View Transition API 主题扩散动画 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 99999;
}

/* 全局隐藏原生浏览器滚动条 */
html, body, * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

html {
  min-height: 100%;
}

/* 扁平纯色背景 */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
}

button, input, a, select {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  flex: 1 0 auto;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.75rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  flex-shrink: 0;
}

.site-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.logo-text {
  letter-spacing: -0.01em;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-icon-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.nav-icon-button:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--card-bg-subtle);
}

.nav-icon-button svg,
.icon-svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Container */
.container {
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.75rem 2.5rem;
  flex: 1 0 auto;
}

/* Views */
.view {
  display: none;
}

.view-active,
.view:not(.hidden) {
  display: block;
}

/* Top Global Stats (4 Boxes) - Flat */
.global-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.stat-box {
  background: var(--card-bg);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  gap: 0.45rem;
  transition: border-color 0.15s ease;
}

.stat-box:hover {
  border-color: var(--border-hover);
}

.stat-box__title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

.metric-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.stat-box__value {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stat-box__sub {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.74rem;
  color: var(--text-muted);
  gap: 6px;
  flex-wrap: wrap;
}

.speed-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-family: var(--font-mono);
}

/* Group & Search Bar - Pure Text Links (No Color Highlight, Just Bold) */
.group-bar {
  margin: 0.75rem 0 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 34px;
}

.group-bar__main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  height: 34px;
}

.group-text-links {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  height: 100%;
  white-space: nowrap;
}

.group-text-links::-webkit-scrollbar {
  display: none;
}

.group-text-link {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease;
  user-select: none;
  line-height: 1;
  padding: 3px 2px;
}

.group-text-link:hover {
  color: var(--text-main);
}

.group-text-link.is-active {
  color: var(--text-main);
  font-weight: 700;
}

.group-sep {
  color: var(--border-color);
  font-size: 0.78rem;
  user-select: none;
  opacity: 0.7;
}

.group-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
  height: 34px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 胶囊搜索组件样式 */
.search-box--inline {
  width: 240px;
  padding: 0 14px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  transition: border-color 0.15s ease;
}

.search-box--inline:focus-within {
  border-color: var(--border-hover);
}

.search-box__icon {
  width: 13px;
  height: 13px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-box__icon::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.35-4.35m1.85-5.15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m21 21-4.35-4.35m1.85-5.15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 0.78rem;
}

.search-box input::placeholder {
  color: var(--text-soft);
}

/* Card Grid - 1 Row 4 Columns */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Server Card - Flat, Crisp & Structured */
.server-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s ease;
}

.server-card:hover {
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
}

.server-card__button {
  width: 100%;
  padding: 1.15rem 1.2rem 1.05rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

/* Row 1: Header - 左侧呼吸点+名称，右侧国旗 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.srv-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-dot--online {
  background-color: var(--success);
  box-shadow: 0 0 0 0 rgba(var(--success-rgb), 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.pulse-dot--offline {
  background-color: var(--danger);
}

@keyframes pulse-ring {
  to {
    box-shadow: 0 0 0 6px rgba(var(--success-rgb), 0);
  }
}

.srv-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
}

.srv-flag,
.detail-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 14px;
  line-height: 1;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.flag-image {
  width: 19px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Row 2: Dials (CPU, RAM, Disk) */
.dials {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 0.65rem;
}

.dial-group {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  min-width: 0;
}

.circle-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--primary) var(--pct, 0%), var(--border-color) 0);
  position: relative;
  flex-shrink: 0;
}

.circle-inner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.dial-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
}

.dial-val {
  font-size: 0.64rem;
  font-weight: 400;
  color: var(--text-soft);
  font-family: var(--font-mono);
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* 分割线 (加大间隔与呼吸感) */
.card-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 0 0.8rem;
  width: 100%;
}

/* 4 行核心指标: 速率 / 流量 / 活跃 / 价值 (适当拉开高度间距) */
.card-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  line-height: 1.6;
  gap: 8px;
  margin-bottom: 0.52rem;
}

.info-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.row-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-soft);
  flex-shrink: 0;
}

.info-val {
  color: var(--text-main);
  font-weight: 400;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 底部平行放置延迟 (4 列并排) */
.parallel-pings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 4px;
  padding-top: 0.15rem;
}

.ping-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ping-cell__label {
  font-size: 0.68rem;
  color: var(--text-soft);
  font-weight: 500;
}

.ping-cell__val {
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
}

.ping-cell__val--good { color: var(--success); }
.ping-cell__val--med { color: var(--warning); }
.ping-cell__val--bad { color: var(--danger); }

/* Empty State */
.empty-state {
  margin: 2.5rem 0;
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.empty-state__icon {
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.empty-state__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state__description {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Detail View */
.detail-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0 1.25rem;
  padding: 0.25rem 0;
}

.detail-title-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.detail-node-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.detail-uuid {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-soft);
  background: var(--card-bg-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.detail-back-side {
  flex-shrink: 0;
}

.detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.detail-back-link:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: var(--card-bg-subtle);
}

.detail-back-link svg {
  width: 14px;
  height: 14px;
}

/* Detail Panels (3 Consolidated Structured Cards) - Flat */
.detail-panels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.detail-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.detail-panel__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-color);
}

.detail-panel__title svg {
  color: var(--primary);
}

.detail-panel__content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.76rem;
  line-height: 1.5;
}

.spec-label {
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 500;
}

.spec-val {
  color: var(--text-main);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-group__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.bar-group__meta span:last-child {
  color: var(--text-main);
  font-weight: 500;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.bar-group__track {
  height: 5px;
  border-radius: var(--radius-sm);
  background: var(--card-bg-subtle);
  overflow: hidden;
}

.bar-group__track span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* Detail Chart Card (No Highlight Color, Pure Bold Tab Links) */
.charts-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: var(--card-bg);
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.chart-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.chart-nav-link {
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
  user-select: none;
  padding: 2px 4px;
}

.chart-nav-link:hover {
  color: var(--text-main);
}

.chart-nav-link.is-active {
  color: var(--text-main);
  font-weight: 700;
}

.chart-nav-sep {
  color: var(--border-color);
  font-size: 0.76rem;
  opacity: 0.7;
  user-select: none;
}

.chart-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-val-summary {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.hour-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--card-bg-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 9px center / 11px no-repeat;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 26px 3px 8px;
  cursor: pointer;
  outline: 0;
}

.hour-select:focus {
  border-color: var(--border-hover);
}

.chart-svg {
  width: 100%;
  height: auto;
  min-height: 230px;
  max-height: 320px;
}

.chart-svg .grid line {
  stroke: var(--grid-line);
  stroke-dasharray: 3 3;
}

.chart-svg .grid text {
  fill: var(--text-soft);
  font-size: 11px;
  font-family: var(--font-mono);
}

.chart-svg .axis line {
  stroke: var(--border-color);
}

.chart-svg .axis-label text {
  fill: var(--text-soft);
  font-size: 11px;
  font-family: var(--font-mono);
}

.chart-svg .area {
  fill: url(#area-gradient);
  opacity: 0.25;
}

.chart-svg .line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-svg .line--secondary { stroke: var(--success); }
.chart-svg .line--tertiary { stroke: var(--warning); }
.chart-svg .line--quaternary { stroke: var(--danger); }

.chart-point {
  fill: var(--card-bg);
  stroke: var(--primary);
  stroke-width: 2;
  cursor: pointer;
}

.chart-point[data-tone="secondary"] { stroke: var(--success); }
.chart-point[data-tone="tertiary"] { stroke: var(--warning); }
.chart-point[data-tone="quaternary"] { stroke: var(--danger); }

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 0.3rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s ease;
}

.legend-item.is-disabled {
  opacity: 0.35;
  text-decoration: line-through;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Footer - 纯净无背景，沉底融合 */
.footer {
  margin-top: auto;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border-color);
  background: transparent;
  width: 100%;
}

.footer-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text-main);
  text-decoration: none !important;
}

.footer-dot {
  opacity: 0.4;
}

/* Turnstile Modal */
.probe-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.probe-dialog {
  max-width: 380px;
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: center;
}

.probe-dialog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.probe-dialog-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ts-holder {
  display: flex;
  justify-content: center;
  margin: 0.4rem 0;
  min-height: 65px;
}

.probe-dialog-err {
  font-size: 0.75rem;
  color: var(--danger);
}

/* Tooltip Popup */
.tooltip-box {
  position: fixed;
  z-index: 9999;
  background: #0f172a;
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-mono);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
  max-width: 280px;
  line-height: 1.4;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .global-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-panels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.7rem 1.15rem;
  }
  .container {
    padding: 0 1.15rem 2rem;
  }
  .global-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem;
    margin: 0.85rem 0 1rem;
  }
  .stat-box {
    padding: 0.85rem 0.95rem;
    gap: 0.3rem;
  }
  .stat-box__title {
    font-size: 0.74rem;
  }
  .stat-box__value {
    font-size: 1.2rem;
  }
  .stat-box__sub {
    font-size: 0.7rem;
  }
  .group-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    height: auto;
  }
  .group-bar__main {
    width: 100%;
  }
  .group-actions {
    width: 100%;
    margin-left: 0;
  }
  .search-box--inline {
    width: 100%;
    min-width: 0;
  }
  .detail-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}

@media (max-width: 540px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .global-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem;
  }
  .stat-box {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
  }
  .stat-box__title {
    font-size: 0.7rem;
  }
  .stat-box__value {
    font-size: 1.1rem;
  }
  .stat-box__sub {
    font-size: 0.66rem;
  }
  .dials {
    gap: 2px;
  }
  .circle-wrap {
    width: 40px;
    height: 40px;
  }
  .circle-inner {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
  }
}
