:root {
  --bg: #0d1117;
  --card: #161b22;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3fb950;
  --accent-dim: #238636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1a2332 0%, var(--bg) 55%);
  color: var(--text);
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.top {
  text-align: center;
  margin-bottom: 8px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand .sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  vertical-align: super;
  margin-left: 4px;
}

.server {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.gauge-wrap {
  background: linear-gradient(165deg, var(--card) 0%, #12181f 100%);
  border-radius: 20px;
  padding: 28px 22px 32px;
  border: 1px solid rgba(240, 246, 252, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.node-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.node-label {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.node-select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid rgba(240, 246, 252, 0.12);
  border-radius: 10px;
  cursor: pointer;
  outline: none;
}

.node-select:hover:not(:disabled) {
  border-color: rgba(63, 185, 80, 0.45);
}

.node-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(63, 185, 80, 0.2);
}

.node-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.meter {
  position: relative;
  height: 200px;
  margin-bottom: 8px;
}

.arc-svg {
  width: 100%;
  height: 160px;
  display: block;
}

.arc-bg {
  fill: none;
  stroke: rgba(240, 246, 252, 0.08);
  stroke-width: 14;
  stroke-linecap: round;
}

.arc-fill {
  fill: none;
  stroke: url(#arcGrad);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 0.15s ease-out;
}

.meter-center {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
}

.phase-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}

.big-num {
  font-size: 2.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(63, 185, 80, 0.35);
}

.meter-center .unit {
  font-size: 0.95rem;
  color: var(--accent);
  margin-top: 4px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.stat {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat.highlight {
  border-color: rgba(63, 185, 80, 0.35);
}

.stat .label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat .val {
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.unit-sm {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 2px;
}

.bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  margin-top: 22px;
  overflow: hidden;
}

.bar-inner {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.12s linear;
}

.btn-start {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #2ea043 0%, var(--accent-dim) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(46, 160, 67, 0.4);
}

.btn-start:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-start:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.hint {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  padding: 26px 24px 22px;
  background: linear-gradient(165deg, var(--card) 0%, #12181f 100%);
  border-radius: 18px;
  border: 1px solid rgba(240, 246, 252, 0.1);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.55);
}

.modal-title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
}

.modal-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.modal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  border: 1px solid rgba(63, 185, 80, 0.22);
}

.modal-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-value {
  flex: 1;
  text-align: right;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(63, 185, 80, 0.25);
}

.modal-unit {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 3.2em;
}

.btn-modal-ok {
  display: block;
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #2ea043 0%, var(--accent-dim) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(46, 160, 67, 0.35);
}

.btn-modal-ok:hover {
  filter: brightness(1.08);
}
