/* Web Vitals Simulator — Google palette */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1A73E8;
  --primary-dim: rgba(26,115,232,0.12);
  --secondary: #4285F4;
  --good: #0D652D;
  --good-bg: rgba(13,101,45,0.12);
  --warn: #E37400;
  --warn-bg: rgba(227,116,0,0.12);
  --poor: #C5221F;
  --poor-bg: rgba(197,34,31,0.12);
  --bg: #0D1117;
  --bg-card: #161B22;
  --bg-hover: #1C2333;
  --border: rgba(26,115,232,0.15);
  --text: #E6EDF3;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --radius: 12px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(26,115,232,0.04), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(22,27,34,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 900px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: 8px; }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }

.main { max-width: 900px; margin: 0 auto; padding: 20px; }

.gauges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }

.metric-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.metric-header { margin-bottom: 8px; }
.metric-name { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.metric-full { display: block; font-size: 0.68rem; color: var(--text-muted); }

.gauge-wrap { position: relative; display: flex; justify-content: center; margin: 8px 0; }
.gauge-canvas { display: block; }
.gauge-value { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 1.3rem; font-weight: 700; }

.badge-row { margin: 6px 0; }
.badge { padding: 3px 10px; font-size: 0.72rem; font-weight: 700; border-radius: 4px; text-transform: uppercase; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.poor { background: var(--poor-bg); color: var(--poor); }

.slider-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; }
.slider { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; background: rgba(26,115,232,0.2); border-radius: 2px; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid var(--bg); }
.slider-label { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); min-width: 55px; text-align: right; }

.tips { font-size: 0.72rem; color: var(--text-dim); text-align: left; margin-top: 6px; line-height: 1.5; }
.tips strong { color: var(--text); }

.overall-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.overall-label { font-size: 0.82rem; color: var(--text-dim); }
.overall-badge { padding: 4px 14px; font-size: 0.82rem; font-weight: 700; border-radius: 6px; text-transform: uppercase; }

@media (max-width: 768px) {
  .gauges-grid { grid-template-columns: 1fr; }
}
