:root {
  color-scheme: light dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  background: #101828;
  color: #e4e7ec;
  --panel-bg: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.1);
  --accent: #38bdf8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem;
}

main {
  max-width: 720px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

header h1 {
  margin-bottom: 0.25rem;
}

.panel-heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.muted {
  color: rgba(228, 231, 236, 0.75);
  margin: 0;
}

.panel {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.clip-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.clip-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.clip-card.selected {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

.clip-card .title {
  font-weight: 600;
}

.clip-card .description {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.divider {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.upload-card {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0.9rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
}

.upload-card input {
  margin-top: 0.5rem;
}

.upload-title {
  font-weight: 600;
}

.upload-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.75rem;
}

input[type='file'] {
  width: 100%;
  color: inherit;
}

button {
  padding: 0.85rem 1.1rem;
  border-radius: 0.9rem;
  border: none;
  background: var(--accent);
  color: #1a70aa;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

audio {
  width: 100%;
  margin-bottom: 1rem;
}

.prediction-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.prediction-text {
  font-size: 1.5rem;
  margin: 0.25rem 0;
}

.secondary {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

#status-output {
  margin: 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
}
