:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #0f1115;
  color: #eceff4;
}

.app {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0 0 18px;
  color: #a8b0bf;
}

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

.drop-card {
  border: 2px dashed #3b4455;
  border-radius: 12px;
  padding: 14px;
  background: #1a1f28;
  min-height: 190px;
}

.drop-card.dragging {
  border-color: #66a8ff;
  background: #20293a;
}

.drop-card.camera-active {
  border-color: #22c55e;
  background: #132618;
}

.drop-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

button {
  background: #2979ff;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

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

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

#videoElement {
  display: none;
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  background: #0a0d13;
}

.controls {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cfd6e4;
  font-size: 0.95rem;
}

.controls input {
  width: 130px;
  border: 1px solid #4a566f;
  border-radius: 6px;
  background: #151923;
  color: #f2f4f8;
  padding: 6px 8px;
}

.meta {
  margin-top: 10px;
  color: #a8b0bf;
  font-size: 0.9rem;
  word-break: break-all;
}

.status {
  margin: 12px 0;
  color: #d6dde8;
}

.status.error {
  color: #ff8484;
}

.status.success {
  color: #8ee59c;
}

.canvas-wrap {
  border-radius: 12px;
  border: 1px solid #394258;
  overflow: auto;
  background: #0a0d13;
  min-height: 200px;
}

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

details {
  margin-top: 12px;
  color: #a8b0bf;
}

code {
  color: #9ecbff;
}
