:root {
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
  min-height: 100vh;
  padding: 40px 20px;
}

.container { max-width: 1000px; margin: 0 auto; }

.glass-panel {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.hidden { display: none !important; }

/* Header */
.page-header {
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.brand h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 4px; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; }

.key-input-container { display: flex; gap: 12px; width: 100%; max-width: 400px; }
input {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 0.95rem;
  outline: none;
}
input:focus { border-color: var(--accent); }

button {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover { background: var(--accent-hover); }
.error-text { color: var(--danger); font-size: 0.85rem; width: 100%; text-align: right; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.stat-card { padding: 24px; }
.stat-card h3 { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card.highlight .stat-value { color: var(--accent); font-size: 2.25rem; }

/* Charts Area */
.charts-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .charts-container { grid-template-columns: 1fr; } }

.chart-box, .models-box { padding: 24px; }
.chart-box h3, .models-box h3 { margin-bottom: 24px; font-size: 1.1rem; }
.canvas-wrapper { position: relative; height: 300px; width: 100%; }

.models-list { list-style: none; }
.models-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}
.models-list li:last-child { border-bottom: none; }
.model-name { color: var(--text-main); font-weight: 500; }
.model-count { color: var(--text-muted); background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; }

.chart-controls { display: flex; gap: 8px; background: rgba(255,255,255,0.05); padding: 4px; border-radius: 8px; }
.btn-interval { background: transparent; border: none; color: #94a3b8; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-family: "Inter", sans-serif; transition: all 0.2s; }
.btn-interval:hover { color: #fff; background: rgba(255,255,255,0.1); }
.btn-interval.active { background: #3b82f6; color: #fff; }