/* Gemma-4-E4B VLM Demo — Space stylesheet */

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a26;
  --border: #2a2a3a;
  --text: #e4e4ec;
  --muted: #8888a0;
  --accent: #7c6af0;
  --accent-glow: rgba(124, 106, 240, 0.25);
  --green: #3ddc84;
  --orange: #ff9f43;
}

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

html { scroll-behavior: smooth; }

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

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--accent);
  font-size: 15px;
}
nav { display: flex; gap: 20px; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 64px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(124, 106, 240, 0.08) 0%, transparent 60%);
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-badge { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--muted);
}

/* Sections */
main { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.demo-section, .about-section, .run-section, .examples-section {
  padding: 48px 0;
}
.section-inner { margin: 0 auto; max-width: 720px; }
.section-inner h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.section-desc {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.section-desc code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
}

/* Demo card */
.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.demo-controls {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.control-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.file-zone { position: relative; }
.file-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--muted);
}
.file-drop:hover { border-color: var(--accent); background: var(--surface2); }
.file-drop p { margin: 8px 0 4px; font-size: 14px; }
.file-drop .hint { font-size: 12px; color: var(--muted); opacity: 0.7; }
.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
}
textarea:focus { outline: none; border-color: var(--accent); }

.btn-primary, .btn-ghost {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.toggle-label input { display: none; }
.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-label input:checked + .toggle-switch { background: var(--accent); }
.toggle-label input:checked + .toggle-switch::after { transform: translateX(16px); }

.demo-output {
  padding: 20px;
  min-height: 120px;
}
.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 20px;
}
.output-placeholder p { font-size: 14px; }
.output-placeholder .small { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.output-message {
  animation: fadeIn 0.3s ease;
}
.output-message .message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.output-message .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
}
.output-message .msg-label { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.output-message .msg-content {
  background: var(--surface2);
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.output-message .msg-content .typing { display: inline-block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.info-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}
.info-list {
  display: grid;
  gap: 6px;
}
.info-list div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(42, 42, 58, 0.4);
}
.info-list div:last-child { border-bottom: none; }
.info-list dt { color: var(--muted); }
.info-list dd { color: var(--text); text-align: right; word-break: break-word; }

.cap-list, .note-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.cap-list li strong { color: var(--text); }
.note-list li { color: var(--muted); padding-left: 12px; position: relative; }
.note-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Run card */
.run-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
}
.run-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.run-step > div { flex: 1; }
.run-step h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.run-step pre {
  background: var(--surface2);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  overflow-x: auto;
  border: 1px solid rgba(42, 42, 58, 0.5);
}
.run-step .small { font-size: 12px; color: var(--muted); margin-top: 6px; }

.requirements-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 8px;
}

/* Examples */
.examples-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.example-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.example-chip:hover {
  border-color: var(--accent);
  background: var(--surface2);
  color: var(--accent);
}

footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-size: 13px;
  color: var(--muted);
}
footer a { color: var(--accent); text-decoration: none; }
