:root {
  --primary: #00d4ff;
  --primary-hover: #00b8e6;
  --accent: #ff3cac;
  --accent2: #784ba0;
  --gradient: linear-gradient(135deg, #00d4ff, #784ba0, #ff3cac);
  --gradient-text: linear-gradient(135deg, #00d4ff, #ff3cac);
  --bg: #0a0a12;
  --surface: #12121e;
  --surface-hover: #1a1a2e;
  --border: #1f1f3a;
  --text: #eef0ff;
  --text-muted: #6b6b8d;
  --success: #00e68a;
  --warning: #ffb347;
  --danger: #ff4d6a;
  --saved: #00e68a;
  --glow: 0 0 20px rgba(0, 212, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 60, 172, 0.15));
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 20px;
}

.hero-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.hero-link {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: var(--gradient);
  color: white;
  box-shadow: var(--glow);
}

.hero-link:hover { opacity: 0.9; box-shadow: 0 0 30px rgba(0, 212, 255, 0.25); }

.hero-link.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-link.secondary:hover { background: var(--surface-hover); }

/* Demo Card */
.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 48px;
  box-shadow: var(--glow);
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.demo-header h2 {
  font-size: 18px;
  font-weight: 700;
}

#model-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab:hover { color: var(--text); background: var(--surface-hover); }
.tab.active { background: var(--gradient); color: white; }

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; }

textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s;
}

textarea:focus { outline: none; border-color: var(--primary); }
textarea::placeholder { color: var(--text-muted); }

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary { background: var(--gradient); color: white; border: none; }
.btn-primary:hover { opacity: 0.9; box-shadow: var(--glow); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-hover); }

/* Results */
.results { margin-top: 20px; }
.results.hidden { display: none; }
.results h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat.saved .stat-value { color: var(--saved); }

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Efficiency bar */
.efficiency-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.efficiency-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease, background-color 0.5s ease;
  background: var(--primary);
}

.efficiency-fill.good { background: var(--success); }
.efficiency-fill.ok { background: var(--warning); }
.efficiency-fill.poor { background: var(--danger); }

/* Issues */
.issues-list { display: flex; flex-direction: column; gap: 8px; }

.issue {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
}

.issue-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.issue-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.issue-icon.info { background: rgba(0, 212, 255, 0.15); color: var(--primary); }

.approx-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 10px;
}

.approx-note.hidden { display: none; }

/* Optimized text */
.optimized-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  margin-bottom: 14px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
}

.feature:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: var(--glow);
}

.feature-icon { font-size: 28px; margin-bottom: 10px; }
.feature h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.feature p { font-size: 13px; color: var(--text-muted); }

/* Footer */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .hero-links { flex-direction: column; align-items: center; }
}
