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

:root {
  --green: #0CCE6B;
  --orange: #FFA400;
  --red: #FF4E42;
  --bg: #0D1117;
  --bg-card: #161B22;
  --border: rgba(48,54,61,0.6);
  --text: #E6EDF3;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --radius: 12px;
  --radius-sm: 8px;
  --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; }

.header { border-bottom: 1px solid var(--border); background: rgba(22,27,34,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; }
.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: rgba(12,206,107,0.12); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

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

.url-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.url-input { flex: 1; padding: 8px 12px; font-family: var(--font); font-size: 0.82rem; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; }
.url-input:focus { border-color: rgba(12,206,107,0.4); }
.device-select { padding: 8px; font-family: var(--font); font-size: 0.75rem; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; cursor: pointer; }
.btn { padding: 8px 18px; font-family: var(--font); font-size: 0.82rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--green), #059669); color: #0D1117; }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(12,206,107,0.3); }

.gauge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.gauge-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.gauge-svg { width: 90px; height: 90px; margin: 0 auto 8px; }
.gauge-circle { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.gauge-bg { stroke: rgba(255,255,255,0.06); }
.gauge-score { font-size: 1.2rem; font-weight: 800; }
.gauge-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; }

.suggestions-card, .metrics-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.panel-header { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.suggestions-list { padding: 8px; }
.suggestion-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; margin-bottom: 4px; }
.suggestion-row.high { background: rgba(255,78,66,0.08); }
.suggestion-row.medium { background: rgba(255,164,0,0.08); }
.suggestion-row.low { background: rgba(12,206,107,0.08); }
.suggestion-impact { font-size: 0.62rem; font-weight: 600; padding: 2px 6px; border-radius: 3px; }
.suggestion-impact.high { background: rgba(255,78,66,0.15); color: var(--red); }
.suggestion-impact.medium { background: rgba(255,164,0,0.15); color: var(--orange); }
.suggestion-impact.low { background: rgba(12,206,107,0.15); color: var(--green); }
.suggestion-text { font-size: 0.75rem; color: var(--text-dim); }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.metric-cell { text-align: center; padding: 8px; }
.metric-value { font-family: var(--mono); font-size: 1rem; font-weight: 700; }
.metric-name { font-size: 0.62rem; color: var(--text-muted); margin-top: 2px; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .gauge-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .url-bar { flex-wrap: wrap; }
}
