* {
  box-sizing: border-box;
}

:root {
  --purple: #6155ff;
  --purple-2: #8a75ff;
  --ink: #121827;
  --muted: #7f8b9e;
  --line: #e8ebf0;
  --card: #ffffff;
  --canvas: #f5f6f7;
  --green: #30c875;
  --green-bg: #effcf4;
  --orange: #f3a817;
  --orange-bg: #fff8e8;
  --blue-bg: #f1f4ff;
}

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

body {
  font-family:
          Inter,
          "PingFang SC",
          "Microsoft YaHei",
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          sans-serif;
  color: var(--ink);
  background: #f4f5f6;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-glow {
  position: fixed;
  inset: 0 0 auto;
  height: 150px;
  pointer-events: none;
  background:
          radial-gradient(circle at 8% 0, rgba(53, 143, 255, .88), transparent 25%),
          radial-gradient(circle at 38% 0, rgba(255, 103, 91, .56), transparent 20%),
          radial-gradient(circle at 51% 0, rgba(255, 220, 83, .56), transparent 22%),
          radial-gradient(circle at 68% 0, rgba(86, 208, 169, .36), transparent 22%);
  filter: blur(20px);
  opacity: .78;
}

.page {
  position: relative;
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 44px;
}

.module-label {
  margin: 18px 0 24px 31px;
  font-size: 22px;
  font-weight: 900;
}

.workspace {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  min-height: 650px;
  background: #fff;
  border-radius: 22px;
  padding: 35px 14px 28px;
  box-shadow: 0 1px 5px rgba(16, 24, 40, .02);
}

.brand {
  padding: 8px 23px 36px;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: -.02em;
}

.nav {
  display: grid;
  gap: 14px;
}

.nav-item {
  height: 82px;
  border: 0;
  border-radius: 14px;
  padding: 0 28px;
  background: transparent;
  color: #7f7f7f;
  display: flex;
  align-items: center;
  gap: 21px;
  font-size: 28px;
  font-weight: 800;
  text-align: left;
}

.nav-item.active {
  color: #675cff;
  background: #f2f6fd;
}

.nav-item.disabled {
  cursor: default;
}

.nav-icon {
  position: relative;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  opacity: .94;
}

.bulb-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 18px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 12px 12px 10px 10px;
}

.bulb-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 2px;
  width: 10px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.people-icon::before,
.people-icon::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.people-icon::before {
  width: 13px;
  height: 13px;
  left: 5px;
  top: 4px;
}

.people-icon::after {
  width: 13px;
  height: 13px;
  right: 3px;
  top: 4px;
}

.people-icon {
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 50% 50%;
}

.tag-icon {
  transform: rotate(45deg);
  border: 2px solid currentColor;
  border-radius: 5px 9px 9px 5px;
  width: 25px;
  height: 25px;
  margin-left: 4px;
}

.tag-icon::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  left: 4px;
  top: 7px;
}

.magic-icon::before {
  content: "✣";
  position: absolute;
  inset: -4px 0 0 0;
  font-size: 34px;
}

.main-card {
  min-height: 650px;
  overflow: hidden;
  background: rgba(255,255,255,.95);
  border: 1px solid #e1e3e7;
  border-radius: 28px;
  box-shadow: 0 1px 7px rgba(20, 29, 44, .04);
}

.toolbar {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e4e6e9;
  background: rgba(255,255,255,.86);
}

.toolbar strong {
  font-size: 17px;
  color: #374154;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.language-select,
.new-project-btn {
  height: 40px;
  border-radius: 9px;
}

.language-select {
  min-width: 90px;
  padding: 0 14px;
  border: 2px solid #5753e9;
  color: #31384a;
  background: #fff;
}

.new-project-btn {
  padding: 0 17px;
  border: 0;
  color: #fff;
  background: #3730bd;
  font-weight: 800;
}

.view {
  padding: 30px 39px 39px;
}

.upload-stage {
  border: 1px solid #dfe3e8;
  border-radius: 14px;
  background: #fff;
  padding: 20px;
}

/* =========================================================
   单视频上传区域
   未选择视频：上传提示
   已选择视频：同一区域直接显示 video 预览
========================================================= */

.drop-zone {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border: 1.5px dashed #d6dce5;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
          border-color .18s ease,
          background-color .18s ease,
          box-shadow .18s ease;
}

.drop-zone:hover {
  border-color: #8a82ff;
  background: #fcfcff;
}

.drop-zone.dragover {
  border-color: #6155ff;
  background: #f8f7ff;
  box-shadow: inset 0 0 0 1px rgba(97, 85, 255, .09);
}

.upload-empty {
  width: 100%;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.upload-icon {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  border-radius: 50%;
  background: #f2f4f7;
}

.upload-icon::before {
  content: "⇧";
  position: absolute;
  inset: 5px 0 0;
  color: #67758a;
  text-align: center;
  font-size: 29px;
  font-weight: 600;
}

.upload-empty h2 {
  margin: 0 0 9px;
  color: #475064;
  font-size: 17px;
  font-weight: 800;
}

.upload-empty p {
  margin: 0;
  color: #9ca7b8;
  font-size: 13px;
}

/* 视频直接占满上传区域 */
.video-preview-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #070a0f;
  cursor: default;
}

.video-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070a0f;
}

/* 右上角更换视频 */
.change-video-btn {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  color: #fff;
  background: rgba(16, 20, 31, .76);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
          background .18s ease,
          opacity .18s ease;
}

.change-video-btn:hover {
  background: rgba(30, 36, 53, .96);
}

.change-video-btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.upload-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.selected-video-info {
  min-width: 0;
}

.upload-tip {
  display: block;
  color: #9ca6b6;
  font-size: 12px;
}

.selected-video-meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #98a2b3;
  font-size: 12px;
}

.selected-video-meta strong {
  max-width: 460px;
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-video-meta span {
  flex-shrink: 0;
}

.analyze-btn {
  flex-shrink: 0;
  min-height: 50px;
  padding: 0 27px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #4f5eff, #9175ff);
  box-shadow: 0 8px 18px rgba(96, 86, 255, .18);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition:
          transform .18s ease,
          box-shadow .18s ease,
          opacity .18s ease;
}

.analyze-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(96, 86, 255, .25);
}

.analyze-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
}

.processing-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.processing-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, #5b62ff, #9a71ff);
  box-shadow: 0 15px 35px rgba(103, 90, 255, .22);
}

.processing-card h2 {
  margin: 24px 0 7px;
  font-size: 28px;
}

.processing-card > p {
  margin: 0;
  color: #8995a7;
}

.progress-meta,
.progress-track,
.process-steps {
  width: min(770px, 100%);
}

.progress-meta {
  margin-top: 34px;
  display: flex;
  justify-content: space-between;
  color: #68758a;
  font-size: 13px;
}

.progress-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef3;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5861ff, #9d75ff);
  transition: width .28s ease;
}

.process-steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.process-step {
  min-height: 82px;
  padding: 13px;
  display: flex;
  gap: 9px;
  text-align: left;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  opacity: .45;
}

.process-step > span {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0f2f6;
  font-size: 12px;
  font-weight: 900;
}

.process-step strong,
.process-step small {
  display: block;
}

.process-step small {
  margin-top: 5px;
  color: #9aa4b3;
  line-height: 1.35;
}

.process-step.active {
  opacity: 1;
  border-color: #9b96ff;
  background: #faf9ff;
}

.process-step.done {
  opacity: .82;
}

.process-step.done > span {
  color: #1ebd6a;
  background: #eaf9f0;
}

.report-view {
  padding-top: 16px;
}

.report-heading {
  padding: 0 2px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.report-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.report-title-wrap h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.035em;
}

.report-title-wrap > span {
  padding: 4px 8px;
  color: #5146d7;
  background: #e9e8ff;
  font-size: 11px;
  font-weight: 900;
}

.report-meta {
  color: #98a2b2;
  text-align: right;
  font-size: 12px;
  line-height: 1.7;
}

.report-meta strong {
  color: #5245df;
}

.divider {
  height: 1px;
  margin: 22px 0 30px;
  background: #eceef1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.stat-card {
  min-height: 90px;
  padding: 19px 20px;
  border: 1px solid #e3e6eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(24, 35, 52, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card span,
.stat-card strong {
  display: block;
}

.stat-card span {
  color: #a1a9b6;
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong {
  margin-top: 5px;
  font-size: 25px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 22px;
  font-weight: 800;
}

.stat-total .stat-icon {
  color: #5d55ff;
  background: #f2f0ff;
}

.stat-pass strong,
.stat-pass .stat-icon {
  color: #2abf6d;
}

.stat-pass .stat-icon {
  background: #eefbf3;
}

.stat-improve strong,
.stat-improve .stat-icon {
  color: #f3a50d;
}

.stat-improve .stat-icon {
  background: #fff7e6;
}

.section-caption {
  margin-bottom: 18px;
  color: #91a0b4;
  font-weight: 800;
  font-size: 12px;
}

.abcd-section,
.guide-section {
  margin-top: 30px;
}

.abcd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.pillar-card {
  min-height: 224px;
  padding: 20px;
  border: 1px solid #e2e5ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 36, 51, .07);
}

.pillar-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #eff0f2;
}

.pillar-letter {
  color: #9caabe;
  font-size: 31px;
  font-weight: 900;
}

.pillar-name small,
.pillar-name strong {
  display: block;
}

.pillar-name small {
  color: #9eaabe;
  font-size: 10px;
  font-weight: 900;
}

.pillar-name strong {
  margin-top: 2px;
  font-size: 14px;
}

.pillar-symbol {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #77859a;
  background: #f7f8fa;
  font-weight: 900;
}

.check-list {
  display: grid;
  gap: 14px;
  margin-top: 17px;
}

.check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
}

.check-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 900;
}

.check-item.pass .check-mark {
  color: #24bf69;
  border: 1.5px solid #63da96;
}

.check-item:not(.pass) .check-mark {
  color: #65b5a1;
  border: 1.5px solid #8dcfc0;
}

.check-content strong,
.check-content small {
  display: block;
}

.check-content strong {
  font-size: 12px;
}

.check-content small {
  width: max-content;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
}

.check-item.pass .check-content small {
  color: #28ba68;
  background: #effbf4;
}

.check-item:not(.pass) .check-content small {
  color: #7b99a1;
  background: #f3f6f6;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.guide-card {
  min-height: 165px;
  padding: 21px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 16px;
}

.quick-card {
  border: 1px solid #f1df9d;
  background: #fffdf4;
}

.growth-card {
  border: 1px solid #d8dcff;
  background: #f7f8ff;
}

.guide-icon {
  width: 45px;
  height: 45px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 900;
}

.quick-card .guide-icon {
  color: #b9780b;
  background: #fff2c5;
}

.growth-card .guide-icon {
  color: #5147d5;
  background: #e4e7ff;
}

.guide-chip {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.quick-card .guide-chip {
  color: #a16908;
  background: #fff0bc;
}

.growth-card .guide-chip {
  color: #4a43c4;
  background: #e7e9ff;
}

.guide-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.guide-card p {
  margin: 0;
  line-height: 1.75;
  color: #4d5869;
  font-size: 12px;
  font-weight: 550;
}

.details-section {
  margin-top: 23px;
}

.details-toggle {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #e4e7ec;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #536074;
  background: #fafbfc;
  font-weight: 800;
}

.details-body {
  margin-top: 15px;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-card {
  padding: 20px;
  border: 1px solid #e5e8ed;
  border-radius: 14px;
  background: #fff;
}

.detail-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.detail-row {
  padding: 13px 0;
  border-top: 1px solid #eef0f3;
}

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

.detail-row strong {
  color: #5b58df;
  font-size: 12px;
}

.detail-row p {
  margin: 6px 0 0;
  color: #657286;
  line-height: 1.6;
  font-size: 12px;
}

.risk-label {
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.risk-high {
  color: #e44351;
  background: #fff0f1;
}

.risk-medium {
  color: #bd7900;
  background: #fff6df;
}

.risk-low {
  color: #1ba45a;
  background: #eafaf1;
}

.priority-card {
  margin-top: 16px;
}

.fix-card {
  padding: 16px 0;
  border-top: 1px solid #eef0f3;
}

.fix-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.fix-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.priority-chip {
  min-width: 32px;
  padding: 4px 7px;
  border-radius: 7px;
  text-align: center;
  color: #fff;
  background: #665cff;
  font-size: 10px;
  font-weight: 900;
}

.priority-p0 {
  background: #e84e5b;
}

.priority-p1 {
  background: #edaa22;
}

.fix-card h4 {
  margin: 9px 0 6px;
  font-size: 14px;
}

.fix-card p {
  margin: 5px 0;
  color: #687487;
  font-size: 12px;
  line-height: 1.65;
}

.copy-suggestion {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #4954a4;
  background: #f4f5ff;
  font-size: 11px;
}

.error-view {
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-box {
  width: min(520px, 100%);
  padding: 38px;
  text-align: center;
  border: 1px solid #ffd7db;
  border-radius: 18px;
  background: #fffafa;
}

.error-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #ea5360;
  font-size: 27px;
  font-weight: 900;
}

.error-box h2 {
  margin: 17px 0 8px;
}

.error-box p {
  margin: 0 0 22px;
  color: #8b6470;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .nav-item {
    padding: 0 19px;
    font-size: 21px;
  }

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

@media (max-width: 820px) {
  .page {
    width: min(100% - 16px, 1440px);
  }

  .module-label {
    margin-left: 9px;
  }

  .workspace {
    display: block;
  }

  .sidebar {
    min-height: auto;
    margin-bottom: 12px;
    padding: 15px;
  }

  .brand {
    padding: 5px 7px 15px;
  }

  .nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
  }

  .nav-item {
    height: 57px;
    padding: 0 8px;
    justify-content: center;
    font-size: 14px;
  }

  .nav-icon {
    display: none;
  }

  .view {
    padding: 20px 16px 25px;
  }

  .upload-footer,
  .report-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-footer {
    display: flex;
  }

  .analyze-btn {
    width: 100%;
  }

  .report-meta {
    text-align: left;
  }

  .stat-grid,
  .guide-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .toolbar {
    padding: 0 14px;
  }

  .toolbar strong {
    font-size: 14px;
  }

  .new-project-btn {
    display: none;
  }

  .drop-zone {
    height: 230px;
    text-align: center;
  }

  .upload-empty h2 {
    font-size: 16px;
  }

  .upload-footer {
    align-items: stretch;
  }

  .selected-video-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .selected-video-meta strong {
    max-width: 100%;
  }

  .abcd-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .report-title-wrap h1 {
    font-size: 23px;
  }
}
