/* Interlink AI - Modern Dark Theme Styles */
/* Version 2.0 - Enhanced UI/UX */

:root {
  --bg: #050811;
  --bg-panel: #0a0f1a;
  --bg-contrast: #0f1421;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --border: rgba(148, 163, 184, 0.1);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius: 10px;
  --radius-pill: 999px;
  --glow-1: rgba(59, 130, 246, 0.08);
  --glow-2: rgba(6, 182, 212, 0.06);
  --panel-blur: 16px;
  --font-sans: "Inter", "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --hero-img: url("einstein-hero.png");
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #050811 0%, #0a0f1a 100%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: -30% -30% auto -30%;
  height: 100%;
  background: radial-gradient(ellipse at 25% 25%, var(--glow-1), transparent 60%), radial-gradient(ellipse at 75% 75%, var(--glow-2), transparent 60%);
  filter: blur(100px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 46px 46px;
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

/* Page Container */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 64px;
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  background: rgba(12, 15, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(var(--panel-blur));
  position: sticky;
  top: 12px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-mark svg {
  display: block;
}

.brand-name span {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.nav-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -60px -120px auto auto;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(93, 240, 198, 0.2), transparent 55%);
  filter: blur(40px);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-note svg {
  color: var(--success);
}

.hero-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.metric {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  min-width: 120px;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.metric-number {
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.metric-number svg {
  color: var(--accent-2);
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Hero Visual */
.hero-visual {
  display: grid;
  gap: 16px;
}

.einstein-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.06), transparent 50%), radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.04), transparent 50%), var(--bg-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(148, 163, 184, 0.05);
  isolation: isolate;
}

.einstein-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  background: conic-gradient(from 180deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.08), rgba(148, 163, 184, 0.03), rgba(59, 130, 246, 0.1));
  filter: blur(40px);
  opacity: 0.7;
  z-index: 0;
  animation: swirl 30s linear infinite;
}

@keyframes swirl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.einstein-img {
  position: relative;
  min-height: 280px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.06), transparent 40%),
    var(--hero-img),
    radial-gradient(circle at 50% 20%, rgba(122, 167, 255, 0.12), transparent 55%),
    linear-gradient(140deg, #0f1428 0%, #0a0f1e 40%, #0c1020 100%);
  background-size: cover, cover, auto, auto;
  background-repeat: no-repeat;
  background-position: center 10%, center 10%, center, center;
  filter: saturate(1.05);
  z-index: 1;
}

.einstein-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(4, 6, 15, 0) 0%, rgba(4, 6, 15, 0.75) 46%, rgba(4, 6, 15, 0.9) 100%);
  z-index: 2;
  backdrop-filter: blur(6px);
}

.overlay-title {
  font-weight: 700;
  margin: 0 0 4px;
}

.overlay-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.overlay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overlay-chips span {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: var(--text);
}

/* Hero Panel */
.hero-panel {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.04), rgba(6, 182, 212, 0.03)), var(--bg-panel);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--panel-blur));
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(93, 240, 198, 0.15), transparent 60%);
  pointer-events: none;
}

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

.panel-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.panel-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn.full {
  width: 100%;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 8px 24px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow), 0 6px 16px rgba(0, 0, 0, 0.4);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--muted);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-md);
}

.btn-icon.active {
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid #ff6b6b;
  color: #ffb4b4;
}

/* Form Elements */
.field-label {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 14px 0 6px;
  display: block;
}

.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 0.96rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

/* Output Grid */
.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.output-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px;
  min-height: 100px;
  transition: border-color var(--transition-fast);
}

.output-card:hover {
  border-color: var(--muted);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.output-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Tags */
.tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 500;
}

.tag-openai { background: rgba(16, 163, 127, 0.15); color: #5df0c6; border-color: rgba(16, 163, 127, 0.3); }
.tag-claude { background: rgba(107, 79, 187, 0.15); color: #c4b5fd; border-color: rgba(107, 79, 187, 0.3); }
.tag-gemini { background: rgba(66, 133, 244, 0.15); color: #93c5fd; border-color: rgba(66, 133, 244, 0.3); }
.tag-llama { background: rgba(0, 132, 255, 0.15); color: #8dc9ff; border-color: rgba(0, 132, 255, 0.3); }
.tag-kimi { background: rgba(255, 107, 53, 0.15); color: #ffb899; border-color: rgba(255, 107, 53, 0.3); }
.tag-gptoss120b { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }
.tag-gptoss20b { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border-color: rgba(6, 182, 212, 0.3); }
.tag-compound { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; border-color: rgba(236, 72, 153, 0.3); }

.status {
  color: var(--muted);
  font-size: 0.82rem;
}

.stub-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 12px;
}

/* Sections */
.section {
  margin: 96px 0;
  padding: 0 8px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.6), rgba(5, 8, 17, 0.8));
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 48px 32px;
}

.section-contrast {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(6, 182, 212, 0.02)), var(--bg-contrast);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 48px 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--panel-blur));
}

.section-header {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-header h2 {
  margin: 8px 0 12px;
  font-size: 1.9rem;
  font-weight: 700;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.kicker {
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Playground */
.playground {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.playground-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.playground-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}

.playground-output {
  min-height: 400px;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-row label:hover {
  border-color: var(--muted);
}

.toggle-row label:has(input:checked) {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--text);
}

.toggle-row input[type="checkbox"],
.toggle-row input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.prompt-controls {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0 8px;
}

.voice-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.microcopy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.btn-voice {
  width: auto;
  padding: 10px 16px;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
}

.download-csv-btn {
  margin-top: 10px;
}

.vision-upload {
  margin-bottom: 16px;
}

.image-preview {
  margin-top: 10px;
}

.image-preview-content {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--bg-contrast);
}

.image-preview-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.remove-image-btn:hover {
  background: var(--error);
}

/* Results */
.results {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  min-height: 300px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--panel-blur));
}

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: var(--muted);
  text-align: center;
  gap: 12px;
}

.placeholder p {
  margin: 0;
}

.result-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.result-item:last-child {
  border-bottom: none;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speak-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.speak-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

.result-body {
  margin-top: 8px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.6;
}

.model-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.model-avatar svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Feedback Bar */
.feedback-bar {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}

.feedback-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feedback-btn:hover {
  background: var(--bg-contrast);
  transform: scale(1.05);
}

.advanced-feedback-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.advanced-feedback-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.issue-select {
  background: var(--bg-contrast);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}

/* Race Section */
.race-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
}

.race-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.race-config {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.race-results {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  min-height: 300px;
}

.race-status {
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--muted);
}

.race-entries {
  min-height: 200px;
}

.participant-list {
  margin: 12px 0;
  min-height: 40px;
}

.participant-add {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.participant-add .input {
  flex: 1;
}

/* Resources Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.resource-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.resource-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.resource-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.resource-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.resource-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.resource-card li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* Community Grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.community-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.community-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.community-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.community-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.community-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.community-card .btn {
  margin-bottom: 12px;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.highlight {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.03)), var(--bg-panel);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-contrast);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.pricing-badge.highlight-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #ffffff;
}

.pricing-label {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.pricing-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

.pricing-list li:last-child {
  border-bottom: none;
}

.pricing-list svg {
  color: var(--success);
  flex-shrink: 0;
}

/* Expert Mode / One-on-One */
.one-on-one-container {
  max-width: 900px;
  margin: 0 auto;
}

.avatar-selection h3 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--muted);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.tutor-avatar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tutor-avatar:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tutor-avatar.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.tutor-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.tutor-einstein { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.tutor-prof { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.tutor-mentor { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.tutor-sage { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.tutor-cyber { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }

.tutor-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.tutor-bio {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Chat Interface */
.chat-interface {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 24px;
}

.tutor-video-container {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-contrast), var(--bg-panel));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-rings span {
  position: absolute;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  animation: ring-pulse 3s ease-out infinite;
}

.video-rings span:nth-child(1) { width: 100px; height: 100px; animation-delay: 0s; }
.video-rings span:nth-child(2) { width: 150px; height: 150px; animation-delay: 1s; }
.video-rings span:nth-child(3) { width: 200px; height: 200px; animation-delay: 2s; }

@keyframes ring-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.video-noise {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.tutor-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  z-index: 1;
}

.tutor-avatar-large.breathing {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.video-live-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.9);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
}

.video-live-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  animation: pulse 1s infinite;
}

.video-signal {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 2px;
  align-items: flex-end;
}

.video-signal span {
  width: 4px;
  background: var(--success);
  border-radius: 2px;
}

.video-signal span:nth-child(1) { height: 6px; }
.video-signal span:nth-child(2) { height: 10px; }
.video-signal span:nth-child(3) { height: 14px; }
.video-signal span:nth-child(4) { height: 18px; }

.tutor-name-overlay {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  color: var(--text);
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.chat-controls {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 150px;
}

.control-group label {
  font-size: 0.82rem;
  color: var(--muted);
}

.control-group .input {
  padding: 8px 12px;
  font-size: 0.88rem;
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 16px;
}

.chat-message {
  margin-bottom: 16px;
}

.chat-message.assistant .message-content {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  max-width: 80%;
}

.chat-message.user .message-content {
  background: var(--bg-contrast);
  border: 1px solid var(--border);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 80%;
  margin-left: auto;
}

.message-content p {
  margin: 0;
  line-height: 1.6;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.chat-input-area .input {
  flex: 1;
}

/* CTA Section */
.cta-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.08));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-card h2 {
  margin: 8px 0 12px;
  font-size: 1.8rem;
}

.cta-card p {
  color: var(--muted);
  margin: 0;
  max-width: 500px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-left {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--muted);
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--accent);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-contrast);
  color: var(--text);
}

.modal-content h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.modal-content > p {
  color: var(--muted);
  margin: 0 0 24px;
}

/* Tutorial */
.tutorial-step h2 {
  margin: 0 0 8px;
}

.tutorial-steps {
  margin: 24px 0;
}

.tutorial-page {
  display: none;
}

.tutorial-page.active {
  display: block;
}

.tutorial-page h3 {
  color: var(--accent);
  margin: 0 0 12px;
}

.tutorial-page p {
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.6;
}

.tutorial-page ul {
  color: var(--muted);
  margin: 0;
  padding-left: 20px;
}

.tutorial-page li {
  margin-bottom: 8px;
}

.tutorial-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

#tutorialProgress {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Field Group */
.field-group {
  margin-bottom: 16px;
}

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

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .hero-copy {
    text-align: center;
  }
  
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-note {
    justify-content: center;
  }
  
  .hero-metrics {
    justify-content: center;
  }
  
  .playground {
    grid-template-columns: 1fr;
  }
  
  .playground-layout {
    grid-template-columns: 1fr;
  }
  
  .playground-controls {
    position: static;
  }
  
  .race-layout {
    grid-template-columns: 1fr;
  }
  
  .race-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page {
    padding: 16px 16px 48px;
  }
  
  .nav {
    padding: 10px 16px;
    position: relative;
    top: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-cta {
    display: none;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-contrast {
    padding: 24px 20px;
    border-radius: 16px;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .feature-grid,
  .resources-grid,
  .community-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-card {
    padding: 32px 24px;
    text-align: center;
    flex-direction: column;
  }
  
  .cta-actions {
    justify-content: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .avatar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .hero-metrics {
    flex-direction: column;
    align-items: center;
  }
  
  .metric {
    width: 100%;
    max-width: 200px;
  }
  
  .toggle-row {
    flex-direction: column;
  }
  
  .toggle-row label {
    width: 100%;
    justify-content: flex-start;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .avatar-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-controls {
    flex-direction: column;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy,
.hero-visual,
.section-header,
.feature-card,
.resource-card,
.community-card,
.pricing-card {
  animation: fadeIn 0.6s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Selection */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text);
}


/* ============================================
   ANALYTICS DASHBOARD STYLES
   ============================================ */

.analytics-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: #3b82f6;
}

.stat-icon-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  color: #10b981;
}

.stat-icon-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  color: #8b5cf6;
}

.stat-icon-orange {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
  color: #f59e0b;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.analytics-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.analytics-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

.analytics-panel h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.input-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Chart Bars */
.model-performance-chart {
  margin-top: 16px;
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-label {
  width: 80px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}

.chart-bar-bg {
  flex: 1;
  height: 24px;
  background: var(--bg-contrast);
  border-radius: var(--radius);
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  border-radius: var(--radius);
  transition: width 0.5s ease;
}

.chart-bar-openai {
  background: linear-gradient(90deg, #10a37f, #1a7f64);
}

.chart-bar-claude {
  background: linear-gradient(90deg, #6B4FBB, #8b6fd6);
}

.chart-bar-gemini {
  background: linear-gradient(90deg, #4285f4, #5a9cf6);
}

.chart-bar-llama {
  background: linear-gradient(90deg, #0084ff, #339dff);
}

.chart-bar-mistral {
  background: linear-gradient(90deg, #ff7000, #ff8c33);
}

.chart-bar-deepseek {
  background: linear-gradient(90deg, #00d4aa, #33debb);
}

.chart-value {
  width: 45px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* Experiment Log */
.experiment-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.experiment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.experiment-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.experiment-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-success {
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-warning {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-pending {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.experiment-info {
  flex: 1;
  min-width: 0;
}

.experiment-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.experiment-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.experiment-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--success);
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-pill);
}

/* Analytics Insights */
.analytics-insights {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.analytics-insights h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.insight-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
}

.insight-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.insight-content {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.insight-content strong {
  color: var(--text);
}

/* ============================================
   DEVOPS WORKFLOW STYLES
   ============================================ */

.workflow-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.workflow-pipeline {
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 0;
}

.pipeline-stage {
  flex: 1;
  min-width: 280px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.pipeline-stage:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.pipeline-stage[data-stage="production"] {
  border-color: rgba(16, 185, 129, 0.3);
}

.pipeline-stage[data-stage="production"]:hover {
  border-color: var(--success);
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.stage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.stage-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stage-icon-dev {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: #3b82f6;
}

.stage-icon-staging {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
  color: #f59e0b;
}

.stage-icon-prod {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  color: #10b981;
}

.stage-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.stage-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stage-active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stage-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stage-live {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stage-content {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  flex: 1;
}

.stage-stat {
  display: flex;
  flex-direction: column;
}

.stage-stat .stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.stage-stat .stat-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

.stage-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.stage-actions .btn {
  flex: 1;
}

/* Workflow Details */
.workflow-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.workflow-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.workflow-panel h4 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.deployment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deployment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
}

.deployment-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.deployment-info {
  flex: 1;
  min-width: 0;
}

.deployment-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: block;
}

.deployment-time {
  font-size: 0.8rem;
  color: var(--muted);
}

.deployment-env {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================
   IMPROVED AVATAR STYLES
   ============================================ */

.tutor-icon-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  border: 3px solid var(--border);
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tutor-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tutor-avatar:hover .tutor-icon-img {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

.tutor-avatar.active .tutor-icon-img {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.tutor-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.tutor-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#activeTutorIcon.breathing {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.5);
  }
}

/* Resource List Styling */
.resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.resource-list li:last-child {
  border-bottom: none;
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .analytics-panels {
    grid-template-columns: 1fr;
  }
  
  .workflow-pipeline {
    flex-direction: column;
  }
  
  .pipeline-arrow {
    transform: rotate(90deg);
    justify-content: center;
    padding: 8px 0;
  }
  
  .pipeline-stage {
    min-width: auto;
  }
  
  .workflow-details {
    grid-template-columns: 1fr;
  }
  
  .analytics-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  
  .insight-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .analytics-stats {
    grid-template-columns: 1fr;
  }
  
  .chart-bar-row {
    flex-wrap: wrap;
  }
  
  .chart-label {
    width: 100%;
    margin-bottom: 4px;
  }
}


/* ===================================
   A/B TESTING SECTION
   =================================== */

.ab-testing-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.ab-test-creator {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.ab-test-creator h3 {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.ab-test-form .field-group {
  margin-bottom: 1rem;
}

.ab-variants {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.variant-card {
  flex: 1;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}

.variant-card.variant-a {
  border-color: var(--accent);
}

.variant-card.variant-b {
  border-color: var(--accent-2);
}

.variant-header {
  margin-bottom: 0.75rem;
}

.variant-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.variant-vs {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--muted);
}

.ab-test-config {
  margin: 1.5rem 0;
}

.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.range-input {
  width: 100%;
  margin: 0.5rem 0;
  -webkit-appearance: none;
  height: 6px;
  background: var(--bg-contrast);
  border-radius: 3px;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.split-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted);
}

.ab-tests-list {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.ab-tests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ab-tests-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

.input-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.ab-tests-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ab-test-card {
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.ab-test-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.ab-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.ab-test-name {
  font-weight: 600;
  font-size: 1rem;
}

.ab-test-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-running {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-draft {
  background: rgba(107, 114, 128, 0.15);
  color: var(--muted);
}

.ab-test-progress {
  margin-bottom: 1rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-panel);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--muted);
}

.ab-test-results-preview {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.result-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.variant-tag {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
}

.variant-a-tag {
  background: var(--accent);
  color: white;
}

.variant-b-tag {
  background: var(--accent-2);
  color: white;
}

.result-value {
  font-weight: 600;
  font-size: 1.125rem;
}

.result-badge {
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
}

.result-badge.winner {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.ab-test-winner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  color: var(--success);
}

.ab-test-winner svg {
  stroke: var(--success);
}

.ab-test-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.stat-value {
  font-weight: 600;
  font-size: 1rem;
}

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

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

.ab-test-actions {
  display: flex;
  gap: 0.75rem;
}

/* ===================================
   CI/CD PIPELINES SECTION
   =================================== */

.pipelines-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}

.pipeline-creator {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.pipeline-creator h3 {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.pipeline-form .field-group {
  margin-bottom: 1rem;
}

.pipeline-stages-config {
  margin: 1.5rem 0;
}

.pipeline-stages-config > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.stages-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.checkbox-label input {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.stage-name {
  font-weight: 600;
  min-width: 80px;
}

.stage-desc {
  font-size: 0.875rem;
  color: var(--muted);
}

.pipelines-list {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.pipelines-list h3 {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.pipelines-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pipeline-card {
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.pipeline-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pipeline-name {
  font-weight: 600;
  font-size: 1rem;
}

.pipeline-kit {
  font-size: 0.875rem;
  color: var(--muted);
}

.pipeline-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.pipeline-status.status-running {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.pipeline-status.status-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.pipeline-status.status-failed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.pipeline-stages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pipeline-stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pipeline-stage-item span {
  font-size: 0.75rem;
  color: var(--muted);
}

.stage-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-stage-item.completed .stage-indicator {
  background: var(--success);
  border-color: var(--success);
}

.pipeline-stage-item.completed .stage-indicator svg {
  stroke: white;
}

.pipeline-stage-item.running .stage-indicator {
  background: var(--accent);
  border-color: var(--accent);
}

.pipeline-stage-item.pending .stage-indicator {
  background: var(--bg-panel);
  border-color: var(--border);
}

.stage-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 20px;
}

.stage-connector.completed {
  background: var(--success);
}

.stage-connector.running {
  background: linear-gradient(90deg, var(--success), var(--accent));
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pipeline-actions {
  display: flex;
  gap: 0.75rem;
}

.pipeline-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.btn-danger {
  color: var(--error);
  border-color: var(--error);
}

.btn-danger:hover {
  background: var(--error);
  color: white;
}

/* ===================================
   COLLABORATION SECTION
   =================================== */

.collaboration-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 1.5rem;
}

.collab-panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.collab-panel h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.team-header-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.team-header-row .input {
  flex: 1;
}

.team-members {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  position: relative;
}

.member-avatar.online .online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--success);
  border: 2px solid var(--bg-panel);
  border-radius: 50%;
}

.member-info {
  display: flex;
  flex-direction: column;
}

.member-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.member-role {
  font-size: 0.75rem;
  color: var(--muted);
}

.no-team-message {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.invite-section {
  display: flex;
  gap: 0.75rem;
}

.invite-section .input {
  flex: 1;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
}

.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.4;
}

.activity-user {
  font-weight: 600;
  color: var(--text);
}

.activity-action {
  color: var(--muted);
}

.activity-target {
  color: var(--accent);
  font-weight: 500;
}

.activity-detail {
  color: var(--muted);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.team-chat {
  display: flex;
  flex-direction: column;
  height: 300px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chat-message {
  padding: 0.5rem 0.75rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.chat-author {
  font-weight: 600;
  color: var(--accent);
}

.chat-text {
  color: var(--text);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-input-row .input {
  flex: 1;
}

/* ===================================
   TIME-SERIES SECTION
   =================================== */

.timeseries-container {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
}

.timeseries-controls {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.model-toggles-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toggle-mini {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.5;
}

.toggle-mini.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.timeseries-chart-container {
  height: 400px;
  margin-bottom: 2rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.timeseries-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.summary-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-contrast);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon svg {
  stroke: white;
}

.summary-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.875rem;
  color: var(--muted);
}

.summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.summary-change {
  font-size: 0.75rem;
  color: var(--muted);
}

.summary-change.positive {
  color: var(--success);
}

.summary-change.negative {
  color: var(--error);
}

/* ===================================
   RESPONSIVE ADJUSTMENTS FOR NEW SECTIONS
   =================================== */

@media (max-width: 1024px) {
  .ab-testing-container,
  .pipelines-container {
    grid-template-columns: 1fr;
  }
  
  .collaboration-container {
    grid-template-columns: 1fr;
  }
  
  .timeseries-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .config-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ab-variants {
    flex-direction: column;
  }
  
  .variant-vs {
    transform: rotate(90deg);
  }
  
  .timeseries-summary {
    grid-template-columns: 1fr;
  }
  
  .pipeline-stages {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stage-connector {
    display: none;
  }
}

/* Fix for select dropdown visibility */
select.input option {
  background-color: var(--bg-panel);
  color: var(--text);
}

/* ============================================ */
/* Missing CSS fixes - v3.0 cleanup             */
/* ============================================ */

.control-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.7;
  margin-top: 4px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.icon-only {
  padding: 8px;
  min-width: unset;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  min-height: 200px;
}

.results-placeholder p {
  margin: 0;
  font-size: 0.95rem;
}

.code-validation-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.code-validation-panel,
.validation-results-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.code-validation-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.validation-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.validation-toggle-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.validation-toggle-group label:has(input:checked) {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--text);
}

.validation-toggle-group input[type="checkbox"] {
  accent-color: var(--accent);
}

.code-textarea {
  min-height: 280px;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
}

.validation-demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.validation-demo-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.validation-demo-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.validation-demo-btn {
  width: auto;
  min-width: 0;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.validation-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.validation-results-header > div {
  display: grid;
  gap: 4px;
}

.validation-results-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.validation-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.validation-action-btn {
  width: auto;
  min-width: 120px;
  padding: 10px 14px;
  font-size: 0.82rem;
}

.validation-provider-list,
.validation-findings-list,
.validation-errors-list,
.model-updates-grid {
  display: grid;
  gap: 12px;
}

.validation-provider-card,
.validation-finding-card,
.validation-error-card,
.model-update-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-contrast);
  padding: 16px;
}

.validation-provider-head,
.validation-finding-head,
.model-update-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.validation-provider-head h4,
.validation-finding-head h4,
.model-update-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.validation-provider-model,
.model-update-provider,
.validation-finding-meta,
.validation-provider-summary {
  color: var(--muted);
  font-size: 0.84rem;
}

.model-update-review {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text);
}

.validation-section-title {
  margin: 18px 0 10px;
  font-size: 0.92rem;
  color: var(--text);
}

.severity-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.severity-low {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.severity-medium {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.severity-high,
.severity-critical {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.severity-info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.status-configured {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.status-missing_key {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.validation-finding-card p,
.validation-provider-card p,
.validation-error-card p,
.model-update-card p {
  margin: 6px 0 0;
}

.status-text {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.race-output {
  min-height: 200px;
}

.phone-interface {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.video-hypno {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(59, 130, 246, 0.05) 100%);
  pointer-events: none;
  animation: hypno-pulse 4s ease-in-out infinite;
}

@keyframes hypno-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.activity-panel,
.chat-panel,
.team-panel,
.team-info {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.ab-test-running {
  border-left: 3px solid var(--warning);
}

.ab-test-completed {
  border-left: 3px solid var(--success);
}

.pipeline-completed {
  border-left: 3px solid var(--success);
}

/* Fix model toggles container */
.model-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.model-toggles label:hover {
  border-color: var(--muted);
}

.model-toggles label:has(input:checked) {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--text);
}

.model-toggles input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Image preview */
.image-preview {
  margin-top: 8px;
}

.image-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

  .code-validation-layout {
    grid-template-columns: 1fr;
  }
  
  .section-alt {
    padding: 32px 20px;
  }
  
  .section {
    margin: 64px 0;
  }
}
