:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #141820;
  --panel-2: #1b212b;
  --text: #f5f7fb;
  --muted: #9ba7b8;
  --line: rgba(255, 255, 255, 0.1);
  --red: #e4343a;
  --cyan: #25d0cc;
  --gold: #e5b85e;
  --green: #36bd8d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #101318;
  padding: 24px;
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e12;
  padding: 4px;
  margin-bottom: 22px;
}

.mode-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 800;
}

.mode-switch button.active {
  background: #242b35;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--red);
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p,
.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
}

.project-form {
  display: grid;
  gap: 14px;
}

.upload-box {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(37, 208, 204, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 208, 204, 0.08), rgba(229, 184, 94, 0.05));
  padding: 12px;
}

.upload-box strong {
  display: block;
  font-size: 14px;
}

.upload-box span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.upload-box input {
  padding: 9px;
}

.upload-box button {
  background: #202834;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: #c8d0dd;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1015;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 208, 204, 0.7);
  box-shadow: 0 0 0 3px rgba(37, 208, 204, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

button,
.ghost-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171c24;
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.ghost-link:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

button:disabled,
.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.primary {
  border: 0;
  background: var(--red);
  font-weight: 800;
}

.primary-action {
  border-color: rgba(228, 52, 58, 0.45);
  background: var(--red);
  font-weight: 800;
}

.project-list {
  margin-top: 30px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 16px;
}

.project-item {
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
}

.project-item strong {
  display: block;
  font-size: 14px;
}

.project-item span {
  color: var(--muted);
  font-size: 12px;
}

.interview-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.interview-record .project-item {
  min-width: 0;
}

.interview-retry {
  margin-bottom: 8px;
  border-color: rgba(229, 184, 94, 0.28);
  color: #f1cb7e;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  padding: 26px 32px 40px;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar h2 {
  margin-top: 5px;
  font-size: 28px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.interview-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  margin-bottom: 16px;
}

.interview-summary.radar-summary {
  grid-template-columns: repeat(4, 1fr);
}

.interview-summary > div {
  background: var(--panel);
  padding: 16px;
}

.interview-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
}

.summary-band > div {
  background: var(--panel);
  padding: 16px;
}

.summary-band strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.status-line {
  border-left: 4px solid var(--cyan);
  background: rgba(37, 208, 204, 0.08);
  color: #d8ffff;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 22px;
}

.panel,
.scene-section,
.video-output {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.video-output {
  margin-bottom: 22px;
}

.publish-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}

.publish-title-label {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.publish-title-value {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.copy-title-button {
  min-width: 94px;
  border-color: rgba(37, 208, 204, 0.34);
  background: rgba(37, 208, 204, 0.09);
  color: #d8ffff;
  font-weight: 800;
}

.video-output video {
  display: block;
  width: 100%;
  max-height: 68vh;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05070a;
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.output-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.hidden {
  display: none !important;
}

.key-points,
.rules {
  margin: 0;
  padding-left: 22px;
  color: #d7deea;
  line-height: 1.65;
}

.scene-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 34px;
  text-align: center;
}

.empty-state.compact {
  padding: 18px 12px;
}

.radar-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.radar-count {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.radar-head-actions,
.radar-source-row,
.radar-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.radar-head-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.radar-filters {
  display: inline-grid;
  grid-template-columns: repeat(4, auto);
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1015;
  padding: 3px;
}

.radar-category-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.radar-category-filter select {
  width: 126px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #11151b;
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.radar-filters button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.radar-filters button.active {
  background: #29313d;
  color: var(--text);
}

.radar-monitor-meta {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(54, 189, 141, 0.24);
  border-radius: 7px;
  background: rgba(54, 189, 141, 0.07);
  color: #c8f7e6;
  margin-bottom: 14px;
  padding: 8px 11px;
  font-size: 12px;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.radar-grid > .empty-state {
  grid-column: 1 / -1;
}

.radar-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.radar-card.priority-urgent {
  border-color: rgba(238, 74, 82, 0.55);
}

.radar-card.priority-recommended {
  border-color: rgba(37, 208, 204, 0.38);
}

.radar-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070a;
}

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

.radar-thumb span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 5px;
  background: rgba(5, 7, 10, 0.86);
  color: #fff;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
}

.radar-body {
  display: grid;
  grid-template-rows: auto minmax(42px, auto) minmax(34px, auto) auto auto auto;
  gap: 9px;
  padding: 13px;
}

.radar-tier,
.radar-category,
.radar-new,
.radar-score {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 10px;
  font-weight: 900;
}

.radar-tier {
  background: rgba(229, 184, 94, 0.14);
  color: #f1cb7e;
}

.radar-new {
  background: rgba(228, 52, 58, 0.16);
  color: #ff9da1;
}

.radar-category {
  background: rgba(128, 143, 165, 0.15);
  color: #c9d2df;
}

.radar-category.category-ai {
  background: rgba(37, 208, 204, 0.13);
  color: #84ebe8;
}

.radar-category.category-celebrity {
  background: rgba(229, 184, 94, 0.14);
  color: #f2ce87;
}

.radar-category.category-hot {
  background: rgba(238, 74, 82, 0.14);
  color: #ff9da1;
}

.radar-category.category-curiosity {
  background: rgba(129, 111, 219, 0.16);
  color: #c5baff;
}

.radar-category.category-finance,
.radar-category.category-technology {
  background: rgba(73, 151, 224, 0.15);
  color: #9bcbf7;
}

.radar-category.category-science,
.radar-category.category-health {
  background: rgba(54, 189, 141, 0.14);
  color: #9be7ca;
}

.radar-category.category-investigation {
  background: rgba(238, 74, 82, 0.14);
  color: #ff9da1;
}

.radar-category.category-japan,
.radar-category.category-creator {
  background: rgba(229, 184, 94, 0.14);
  color: #f2ce87;
}

.radar-score {
  margin-left: auto;
  background: rgba(37, 208, 204, 0.12);
  color: #8ff2ef;
}

.radar-card-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: #b8c3d2;
  font-size: 11px;
}

.radar-card-meta span + span::before {
  content: "·";
  margin-right: 9px;
  color: #596474;
}

.radar-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.radar-reasons span {
  border-left: 2px solid rgba(37, 208, 204, 0.55);
  background: rgba(37, 208, 204, 0.06);
  color: #c5d4df;
  padding: 3px 6px;
  font-size: 10px;
  line-height: 1.35;
}

.radar-alternates {
  margin: 0;
  color: #9aa8ba;
  font-size: 10px;
  line-height: 1.45;
}

.radar-original-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.radar-source {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-body h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #eef2f8;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.radar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.radar-actions a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.radar-actions button {
  border-color: rgba(37, 208, 204, 0.28);
  background: rgba(37, 208, 204, 0.1);
  color: #c9fffc;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.scene-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.scene-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.scene-id {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #202732;
  color: var(--cyan);
  font-weight: 900;
}

.scene-main h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.scene-main p {
  color: #d8deea;
  line-height: 1.65;
}

.scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #cad3df;
  padding: 5px 8px;
  font-size: 12px;
}

.tag.red {
  background: rgba(228, 52, 58, 0.14);
  color: #ffb8bb;
}

.tag.gold {
  background: rgba(229, 184, 94, 0.14);
  color: #ffe1a0;
}

.tag.cyan {
  background: rgba(37, 208, 204, 0.14);
  color: #b9fffb;
}

.scene-side {
  display: grid;
  gap: 10px;
}

.side-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.side-block b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.side-block p {
  color: #d4dbe7;
  font-size: 13px;
  line-height: 1.5;
}

.director-details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  padding: 10px 12px;
}

.director-details summary {
  cursor: pointer;
  color: #cbd5e4;
  font-weight: 800;
}

.director-details p {
  margin-top: 8px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-band,
  .interview-summary,
  .content-grid,
  .scene-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radar-head-actions {
    align-items: flex-end;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

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

  .artifact-actions {
    justify-content: flex-start;
  }

  .publish-title-row {
    grid-template-columns: 1fr;
  }

  .copy-title-button {
    width: 100%;
  }

  .radar-section > .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-head-actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .radar-filters {
    grid-template-columns: repeat(2, auto);
  }

  .sidebar .project-list {
    max-height: 230px;
    overflow-y: auto;
    padding-right: 4px;
  }
}
