:root {
  --bg0: #f4f8fb;
  --bg1: #eaf2f7;
  --ink: #1a2b33;
  --muted: #5f7380;
  --line: rgba(26, 43, 51, 0.12);
  --accent: #1fa97a;
  --accent-ink: #ffffff;
  --accent-soft: #e6f7f0;
  --danger: #d94b3d;
  --card: #ffffff;
  --radius: 18px;
  --font: "DM Sans", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 8% -8%, #d9f0ff 0%, transparent 55%),
    radial-gradient(900px 520px at 100% 0%, #d8f5ea 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 169, 122, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 169, 122, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 18%, #000 25%, transparent 78%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
  position: relative;
}

.brand .logo {
  margin: 0 0 10px;
  letter-spacing: 0.28em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.brand h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.brand .lead {
  margin: 14px 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.uploader { margin-top: 36px; }

.dropzone {
  display: grid;
  gap: 8px;
  place-items: center;
  text-align: center;
  padding: 48px 24px;
  border: 1.5px dashed rgba(31, 169, 122, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 28px rgba(26, 43, 51, 0.06);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.dz-title { font-size: 1.15rem; font-weight: 700; }
.dz-sub { color: var(--muted); font-size: 0.92rem; }
.dz-file { color: var(--accent); font-size: 0.95rem; min-height: 1.2em; font-weight: 600; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, opacity .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary {
  margin-top: 16px;
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(31, 169, 122, 0.25);
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.small { padding: 8px 14px; font-size: 0.88rem; }

.progress-panel {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 43, 51, 0.05);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(26, 43, 51, 0.08);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #59c49a, var(--accent));
  transition: width .35s ease;
}

.results { margin-top: 28px; }
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.board-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.results-head h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.summary { color: var(--muted); margin: 0 0 16px; }

.board-canvas {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(26, 43, 51, 0.06);
}
.shot-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* 左图右文：预览完整显示、不裁切 */
.shot-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(26, 43, 51, 0.08);
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  min-height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.shot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 43, 51, 0.1);
}
.shot-media {
  position: relative;
  background: #eef3f6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 10px;
}
.shot-media img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 8px;
  background: #dde6ec;
}
.shot-duration {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(26, 43, 51, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.shot-body {
  padding: 14px 16px 16px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.shot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.tag-shot { background: #e8f1ff; color: #2f6fed; }
.tag-frame { background: #e7f8ef; color: #1f8a4c; }
.tag-cam { background: #fff0e4; color: #c45c12; }
.tag-src { background: #f0eaff; color: #6b4de6; }
.shot-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #3d4d56;
  flex: 1;
  white-space: pre-wrap;
  font-family: inherit;
  background: #f7fafc;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(26, 43, 51, 0.06);
}
.shot-card .shot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.shot-card .shot-actions .btn {
  width: auto;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  border: 1px solid rgba(26, 43, 51, 0.12);
  background: #f5f8fa;
  color: var(--ink);
}
.shot-card .shot-actions .btn.accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.error {
  margin-top: 18px;
  color: var(--danger);
  background: rgba(217, 75, 61, 0.08);
  border: 1px solid rgba(217, 75, 61, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
}
.hidden { display: none !important; }

@media (max-width: 720px) {
  .shell { padding-top: 36px; }
  .shot-card {
    grid-template-columns: 1fr;
  }
  .shot-media {
    min-height: 180px;
  }
  .shot-media img {
    max-height: 420px;
  }
}
