﻿:root {
  --bg-ink: #0a1e24;
  --bg-mid: #0f3c47;
  --bg-soft: #f1f4ee;
  --card: #f8fbf7;
  --text-main: #132025;
  --text-dim: #4f5f66;
  --accent: #ff6f3c;
  --accent-dark: #c94f24;
  --line: #d7dfdc;
  --shadow: 0 14px 40px rgba(10, 30, 36, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Archivo", sans-serif;
  color: var(--text-main);
  background: #dce7df;
}

.app-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 111, 60, 0.22), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(9, 113, 140, 0.26), transparent 38%),
    linear-gradient(180deg, var(--bg-mid), #1f575f 38%, #8bb8ad 100%);
  z-index: -1;
}

.layout {
  width: min(1220px, 94vw);
  margin: 28px auto;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.08fr 0.92fr;
}

.panel {
  background: linear-gradient(180deg, #fdfefd 0%, #f6faf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(6px);
}

.panel-head h1,
.panel-head h2 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.panel-head h1 {
  font-size: clamp(1.28rem, 2.6vw, 1.8rem);
}

.panel-head h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.panel-head p {
  margin: 0;
  color: var(--text-dim);
}

.camera-shell {
  position: relative;
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #08171d;
  border: 1px solid #153542;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ring {
  position: absolute;
  width: min(48vw, 260px);
  height: min(48vw, 260px);
  max-width: 65%;
  max-height: 65%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.crosshair,
.crosshair::before {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
}

.crosshair {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.crosshair::before {
  width: 100%;
  height: 2px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.aim-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #ffb99e 55%, #ff6430);
  border: 2px solid rgba(255, 255, 255, 0.9);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.28);
}

.status-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.status-grid > div {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #d8e1dd;
}

.label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

strong {
  font-size: 0.95rem;
}

.actions,
.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  border: 1px solid #a4b5b9;
  background: #f1f6f7;
  color: #102026;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #e8f0f2;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: #153f4a;
  color: #f5fffd;
  border-color: #153f4a;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4f5d;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
}

.btn-accent:hover:not(:disabled) {
  background: #ff7f52;
}

.toggles {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.94rem;
}

.toggles label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.thumb-wrap {
  margin-top: 12px;
}

.thumb-wrap h2 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 8px;
  font-size: 1rem;
}

.thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cad5d2;
  background: #e2e8e4;
  min-height: 80px;
  position: relative;
}

.thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.thumb span {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(13, 26, 31, 0.78);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 6px;
}

.viewer {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid #123946;
  background:
    radial-gradient(circle at 50% 38%, rgba(116, 204, 233, 0.35), transparent 42%),
    #082128;
  min-height: 280px;
}

.viewer canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.footnote {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.86rem;
}

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}
