:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2e38;
  --text: #e8eaed;
  --muted: #9aa0ab;
  --accent: #4f8cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.hero .sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 24px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mode-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.controls input[type="file"] {
  color: var(--muted);
  font-size: 13px;
}

.controls button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #232734;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.canvas-wrap {
  position: relative;
  width: 100%;
  background: #05060a;
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#video {
  display: none;
}

#canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.fps {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

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