:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  background: #11161f;
  color: #eef2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto;
  display: grid;
  gap: 24px;
}

header h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 2.4vw, 3rem);
}

header p {
  margin: 0;
  color: #c8d1ff;
  max-width: 52rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.controls label {
  font-weight: 600;
}

.controls select,
.controls button {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: #1f2a40;
  color: #eef2ff;
  font-size: 1rem;
}

.controls button {
  cursor: pointer;
}

.controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  overflow: hidden;
  border-radius: 24px;
  background: #0b1220;
}

#video,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#lightingStatus.ok {
  color: #52ff7d;
}

#lightingStatus.dim,
#lightingStatus.bright {
  color: #ffb84d;
}

#lightingStatus.dark {
  color: #ff6b6b;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(25, 35, 56, 0.9);
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card span {
  display: block;
  color: #9ca6d7;
  margin-bottom: 10px;
}

.stat-card strong {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.wide-card {
  grid-column: span 2;
}

.feedback-text {
  line-height: 1.6;
}

.notes {
  padding: 20px;
  border-radius: 24px;
  background: rgba(17, 24, 43, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notes h2 {
  margin-top: 0;
}

.notes ul {
  margin: 0;
  padding-left: 18px;
}

.notes li {
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .wide-card {
    grid-column: span 1;
  }
}
