* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #fff;
  padding: 20px;
  padding-bottom: 70px; /* 为固定底部留出空间 */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-size: 2rem;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

h1:hover {
  transform: scale(1.02);
  opacity: 0.85;
}

/* 顶部栏 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.settings-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #3a3a5a;
  background: rgba(255, 255, 255, 0.05);
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.settings-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: #00d4ff;
  color: #00d4ff;
  transform: rotate(30deg);
}

/* 上传区域容器 */
.upload-wrapper {
  display: flex;
  position: relative;
  margin-bottom: 20px;
}

/* 左侧书签 Tab */
.input-method-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  left: -2px;
  top: 20px;
  transform: translateX(-100%);
  z-index: 10;
}

.input-tab {
  padding: 14px 10px;
  border: 2px solid #3a3a5a;
  border-right: none;
  background: rgba(30, 30, 50, 0.95);
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  border-radius: 8px 0 0 8px;
  margin-bottom: -2px;
  writing-mode: vertical-rl;
  letter-spacing: 0.15em;
}

.input-tab:first-child {
  border-radius: 8px 0 0 0;
}

.input-tab:last-child {
  border-radius: 0 0 0 8px;
  margin-bottom: 0;
}

.input-tab:hover {
  color: #ccc;
  background: rgba(50, 50, 80, 0.95);
}

.input-tab.active {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  border-color: #00d4ff;
  border-right: 2px solid rgba(30, 30, 50, 0.95);
  margin-right: -2px;
  position: relative;
  z-index: 11;
}

/* 上传区域 */
.upload-zone {
  flex: 1;
  border: 2px solid #3a3a5a;
  border-radius: 0 16px 16px 16px;
  min-height: 300px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
}

/* 当上传区域hover时，同步高亮active的书签（仅在没有视频时） */
.upload-wrapper:not(:has(.has-video)):hover .input-tab.active {
  border-color: #00d4ff;
}

.upload-wrapper:hover .upload-zone:not(.has-video) {
  border-color: #00d4ff;
}

.upload-zone.has-video {
  cursor: default;
  border-style: solid;
  border-color: #3a3a5a;
}

.upload-zone.has-video:hover {
  border-color: #3a3a5a;
  background: rgba(255, 255, 255, 0.02);
}

/* 上传占位符 */
.upload-placeholder {
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-placeholder svg {
  width: 64px;
  height: 64px;
  fill: #4a4a6a;
  margin-bottom: 16px;
}

.upload-placeholder p {
  color: #888;
  font-size: 1.1rem;
}

.upload-placeholder .hint {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
}

/* 输入方式 Tab 切换 */
.input-method-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.input-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.input-tab:hover {
  color: #ccc;
}

.input-tab.active {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
}

/* 上传方式内容区 */
.upload-method-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.upload-method-content svg {
  width: 64px;
  height: 64px;
  fill: #4a4a6a;
  margin-bottom: 16px;
}

.upload-method-content p {
  color: #888;
  font-size: 1.1rem;
}

/* URL 输入框样式 */
.url-input-wrapper {
  display: flex;
  gap: 10px;
  margin: 0 auto;
  width: calc(100% - 80px);
  max-width: 900px;
}

#urlInputContent {
  padding-top: 40px;
  width: 100%;
}

#urlInputContent .hint {
  margin-top: 16px;
  text-align: center;
}

.url-input-wrapper input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #3a3a5a;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.url-input-wrapper input:focus {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
}

.url-input-wrapper input::placeholder {
  color: #666;
}

.btn-load-url {
  padding: 12px 24px;
  background: linear-gradient(135deg, #00d4ff, #7b2cbf);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-load-url:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-load-url:active {
  transform: translateY(0);
}

.btn-load-url:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 视频容器 */
.video-container {
  display: none;
  position: relative;
  width: 100%;
}

.video-container.show {
  display: block;
}

.video-container video {
  width: 100%;
  max-height: 400px;
  background: #000;
  border-radius: 13px;
}

/* 视频上的悬浮操作 */
.video-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
  opacity: 1;
}

.btn-change {
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-change:hover {
  background: rgba(0, 212, 255, 0.8);
  border-color: #00d4ff;
}

/* 视频元信息条 */
.video-meta {
  display: none;
  padding: 14px 20px;
  background: rgba(30, 30, 50, 0.9);
  border: 1px solid #3a3a5a;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 20px;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.video-meta.show {
  display: flex;
}

.video-meta span {
  color: #fff;
}

.meta-divider {
  color: #555 !important;
}

#fileInput {
  display: none;
}

/* 控制面板 */
.controls {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 0.9rem;
  color: #aaa;
}

.control-group select,
.control-group input[type="range"] {
  padding: 10px 16px;
  border: 1px solid #3a3a5a;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  font-size: 1rem;
  min-width: 150px;
}

.control-group input[type="range"] {
  padding: 0;
  height: 8px;
  cursor: pointer;
}

/* 按钮 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #3a3a5a;
  color: #fff;
}

.btn-secondary:hover {
  background: #4a4a6a;
}

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

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

/* 进度条 */
.progress-container {
  display: none;
  margin-bottom: 20px;
}

.progress-container.show {
  display: block;
}

.progress-bar {
  height: 8px;
  background: #2a2a4a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  width: 0%;
  transition: width 0.1s ease;
}

.progress-text {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

/* 预览区域 */
.preview-section {
  display: none;
}

.preview-section.show {
  display: block;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.preview-header h2 {
  font-size: 1.3rem;
  color: #fff;
}

.frame-count {
  background: #3a3a5a;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.frames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-height: 600px;
  overflow-y: auto;
  padding: 4px;
}

.frame-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2a4a;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.frame-item:hover {
  transform: scale(1.02);
}

/* 图片审核状态边框 */
.frame-item.frame-passed {
  border: 3px solid #4caf50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.frame-item.frame-failed {
  border: 3px solid #ff4d6a;
  box-shadow: 0 0 10px rgba(255, 77, 106, 0.4);
}

.frame-item.frame-skipped {
  border: 3px solid #888;
  opacity: 0.7;
}

.frame-item.frame-warning {
  border: 3px solid #ffb347;
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.4);
}

/* 状态徽章 */
.frame-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: none;
}

.frame-status-badge.status-passed {
  display: block;
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

.frame-status-badge.status-failed {
  display: block;
  background: rgba(255, 77, 106, 0.9);
  color: #fff;
}

.frame-status-badge.status-skipped {
  display: block;
  background: rgba(136, 136, 136, 0.9);
  color: #fff;
}

.frame-status-badge.status-warning {
  display: block;
  background: rgba(255, 179, 71, 0.9);
  color: #fff;
}

.frame-item img {
  width: 100%;
  height: auto;
  display: block;
}

.frame-item .frame-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 0.8rem;
  color: #fff;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 响应式 */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    margin-left: 0;
    justify-content: center;
  }

  .frames-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .video-meta {
    font-size: 0.75rem;
  }
}

/* ========== 设置弹窗 ========== */
.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.settings-modal.show {
  display: flex;
}

.settings-content {
  background: #1a1a2e;
  border: 1px solid #3a3a5a;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #3a3a5a;
}

.settings-header h2 {
  font-size: 1.25rem;
  color: #fff;
  margin: 0;
}

.settings-close {
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.settings-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.settings-body {
  padding: 24px;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 500;
}

.setting-icon {
  font-size: 1.1rem;
}

.setting-group input,
.setting-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #3a3a5a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
}

.setting-group input:focus,
.setting-group select:focus {
  outline: none;
  border-color: #00d4ff;
}

.setting-hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 8px;
  line-height: 1.4;
}

.settings-footer {
  padding: 16px 24px 24px;
  display: flex;
  justify-content: flex-end;
}

/* ========== 审核区域 ========== */
.audit-section {
  display: none;
  margin-top: 30px;
}

.audit-section.show {
  display: block;
}

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.audit-header h2 {
  font-size: 1.3rem;
  color: #fff;
}

.audit-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audit-progress-bar {
  width: 150px;
  height: 6px;
  background: #2a2a4a;
  border-radius: 3px;
  overflow: hidden;
}

.audit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf);
  width: 0%;
  transition: width 0.3s ease;
}

.audit-progress-text {
  font-size: 0.85rem;
  color: #888;
}

/* 审核总结 */
.audit-summary {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3a3a5a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.audit-summary.show {
  display: block;
}

.summary-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

/* 整体审核结果 */
.overall-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.overall-result .result-label {
  color: rgba(255, 255, 255, 0.8);
}

.overall-result .result-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.overall-result.result-passed {
  background: rgba(76, 175, 80, 0.2);
  border: 2px solid rgba(76, 175, 80, 0.5);
}

.overall-result.result-passed .result-value {
  color: #4caf50;
}

.overall-result.result-warning {
  background: rgba(255, 179, 71, 0.2);
  border: 2px solid rgba(255, 179, 71, 0.5);
}

.overall-result.result-warning .result-value {
  color: #ffb347;
}

.overall-result.result-failed {
  background: rgba(255, 77, 106, 0.2);
  border: 2px solid rgba(255, 77, 106, 0.5);
}

.overall-result.result-failed .result-value {
  color: #ff4d6a;
}

.summary-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  justify-content: center;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

/* 可点击的统计项 */
.stat-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-danger .stat-value {
  color: #ff4d6a;
}

.stat-warning .stat-value {
  color: #ffb347;
}

.stat-success .stat-value {
  color: #4caf50;
}

.summary-conclusion {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.summary-conclusion.low {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.summary-conclusion.medium {
  background: rgba(255, 179, 71, 0.15);
  border: 1px solid rgba(255, 179, 71, 0.3);
  color: #ffb347;
}

.summary-conclusion.high {
  background: rgba(255, 77, 106, 0.15);
  border: 1px solid rgba(255, 77, 106, 0.3);
  color: #ff4d6a;
}

.summary-conclusion.extreme {
  background: rgba(156, 39, 176, 0.15);
  border: 1px solid rgba(156, 39, 176, 0.3);
  color: #ce93d8;
}

/* 审核结果列表 */
.audit-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 审核卡片 */
.audit-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #3a3a5a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.audit-card:hover {
  transform: translateY(-2px);
}

/* 折叠功能 */
.audit-card .audit-card-body {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.audit-card.collapsed .audit-card-body {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.audit-card .audit-card-header {
  cursor: pointer;
}

.audit-card .audit-card-header[data-toggle="collapse"]:hover {
  background: rgba(255, 255, 255, 0.05);
}

.collapse-toggle {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #888;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.collapse-toggle:hover {
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
}

.toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.audit-card.collapsed .collapse-toggle {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

/* 高亮效果（点击跳转时） */
.audit-card.highlight {
  animation: cardHighlight 1.5s ease;
}

@keyframes cardHighlight {
  0%, 100% {
    box-shadow: none;
  }
  25%, 75% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
    border-color: #00d4ff;
  }
}

.audit-card.risk-low {
  border-left: 4px solid #4caf50;
}

.audit-card.risk-medium {
  border-left: 4px solid #ffb347;
}

.audit-card.risk-high {
  border-left: 4px solid #ff4d6a;
}

.audit-card.risk-extreme {
  border-left: 4px solid #ce93d8;
}

.audit-card.audit-error {
  border-left: 4px solid #666;
}

.audit-card.audit-skipped {
  border-left: 4px solid #888;
  opacity: 0.7;
}

.audit-card.audit-loading {
  border-left: 4px solid #00d4ff;
  opacity: 0.8;
}

.loading-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0, 212, 255, 0.2);
  color: #00d4ff;
  white-space: nowrap;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skip-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(136, 136, 136, 0.2);
  color: #888;
  white-space: nowrap;
}

.skip-reason {
  padding: 12px 16px;
  background: rgba(136, 136, 136, 0.05);
  font-size: 0.85rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skip-icon {
  font-size: 1rem;
}

/* 白名单样式 */
.whitelist-note {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.whitelist-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #888;
}

.whitelist-tag {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* 统计跳过样式 */
.stat-skipped .stat-value {
  color: #888;
}

.audit-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.audit-thumb {
  width: 80px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audit-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.audit-info {
  flex: 1;
}

.audit-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.audit-time {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
}

.error-msg {
  font-size: 0.85rem;
  color: #ff4d6a;
  margin-top: 4px;
}

/* 风险徽章 */
.risk-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.risk-badge.risk-low {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.risk-badge.risk-medium {
  background: rgba(255, 179, 71, 0.2);
  color: #ffb347;
}

.risk-badge.risk-high {
  background: rgba(255, 77, 106, 0.2);
  color: #ff4d6a;
}

.risk-badge.risk-extreme {
  background: rgba(156, 39, 176, 0.2);
  color: #ce93d8;
}

/* 交叉验证信息 */
.validation-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.validation-badge {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

.validation-rounds {
  color: #888;
}

.validation-scores {
  color: #aaa;
  font-family: 'SF Mono', Monaco, monospace;
}

.validation-confidence {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.75rem;
}

.confidence-high .validation-confidence {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.confidence-medium .validation-confidence {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.confidence-low .validation-confidence {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

/* 审核详情 */
.audit-details {
  padding: 0 16px 16px;
}

.audit-detail {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.audit-detail:last-child {
  margin-bottom: 0;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.detail-icon {
  font-size: 1.1rem;
}

.detail-title {
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.detail-score {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-score.score-low {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.detail-score.score-medium {
  background: rgba(255, 179, 71, 0.2);
  color: #ffb347;
}

.detail-score.score-high {
  background: rgba(255, 77, 106, 0.2);
  color: #ff4d6a;
}

.detail-score.score-extreme {
  background: rgba(156, 39, 176, 0.2);
  color: #ce93d8;
}

.face-count {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.detected-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.detected-tag {
  background: rgba(255, 77, 106, 0.15);
  border: 1px solid rgba(255, 77, 106, 0.3);
  color: #ff4d6a;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.detail-analysis {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.5;
}

/* 审核建议 */
.audit-recommendations {
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.05);
  border-top: 1px solid #3a3a5a;
}

.rec-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00d4ff;
  margin-bottom: 8px;
}

.audit-recommendations ul {
  margin: 0;
  padding-left: 20px;
}

.audit-recommendations li {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 4px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast-error {
  background: #ff4d6a;
}

.toast.toast-success {
  background: #4caf50;
}

/* 响应式 - 审核区域 */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
  }

  .audit-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .audit-thumb {
    width: 100%;
    height: 120px;
  }

  .risk-badge {
    margin-top: 8px;
  }

  .summary-stats {
    justify-content: center;
  }

  .settings-content {
    margin: 10px;
  }
}

/* 底部版权 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 15px 20px;
  color: #666;
  font-size: 0.85rem;
}

/* ========== 审核时间轴 ========== */
.audit-timeline {
  display: none;
  margin-top: 12px;
  padding: 16px;
  background: rgba(30, 30, 50, 0.9);
  border: 1px solid #3a3a5a;
  border-radius: 10px;
}

.audit-timeline.show {
  display: block;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.timeline-hint {
  font-size: 0.8rem;
  color: #888;
  flex: 1;
  text-align: right;
}

.timeline-stop-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 77, 106, 0.2);
  color: #ff4d6a;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-stop-btn:hover {
  background: rgba(255, 77, 106, 0.4);
}

.timeline-bar {
  display: flex;
  height: 32px;
  background: #2a2a4a;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.timeline-segment {
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

.timeline-segment:hover {
  filter: brightness(1.2);
  z-index: 1;
}

.timeline-segment.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 212, 255, 0.5);
  z-index: 2;
}

.timeline-segment.looping {
  animation: loopPulse 1s infinite;
}

@keyframes loopPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 212, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 0 2px #fff, 0 0 12px 4px rgba(0, 212, 255, 0.8);
  }
}

.timeline-segment.status-passed {
  background: linear-gradient(180deg, #5cb85c 0%, #4caf50 100%);
}

.timeline-segment.status-warning {
  background: linear-gradient(180deg, #ffcc5c 0%, #ffb347 100%);
}

.timeline-segment.status-failed {
  background: linear-gradient(180deg, #ff6b7a 0%, #ff4d6a 100%);
}

.timeline-segment.status-skipped {
  background: linear-gradient(180deg, #777 0%, #666 100%);
}

.segment-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.timeline-segment .segment-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  z-index: 10;
}

.timeline-segment .segment-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.timeline-segment:hover .segment-tooltip {
  opacity: 1;
  visibility: visible;
}

.timeline-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #888;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-passed .legend-dot {
  background: #4caf50;
}

.legend-warning .legend-dot {
  background: #ffb347;
}

.legend-failed .legend-dot {
  background: #ff4d6a;
}

.legend-skipped .legend-dot {
  background: #666;
}

/* 循环播放指示器 */
.loop-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  background: rgba(0, 212, 255, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  display: none;
  align-items: center;
  gap: 4px;
  z-index: 10;
}

.loop-indicator.show {
  display: flex;
}

.loop-indicator svg {
  width: 14px;
  height: 14px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 响应式 - 时间轴 */
@media (max-width: 768px) {
  .timeline-bar {
    height: 40px;
  }

  .segment-label {
    font-size: 0.65rem;
  }

  .timeline-legend {
    justify-content: center;
  }
}

/* Toast 提示消息 */
.toast-message {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-info {
  background: rgba(0, 212, 255, 0.9);
  color: #fff;
}

.toast-success {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

.toast-warning {
  background: rgba(255, 179, 71, 0.9);
  color: #1a1a2e;
}

.toast-error {
  background: rgba(255, 77, 106, 0.9);
  color: #fff;
}

/* 响应式 - 链接输入 */
@media (max-width: 768px) {
  .upload-wrapper {
    flex-direction: column;
  }

  .input-method-tabs {
    position: relative;
    flex-direction: row;
    transform: none;
    left: 0;
    top: 0;
    width: 100%;
  }

  .input-tab {
    flex: 1;
    border: 2px solid #3a3a5a;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    margin-right: -2px;
    text-align: center;
    writing-mode: horizontal-tb;
    letter-spacing: normal;
    padding: 10px 16px;
  }

  .input-tab:first-child {
    border-radius: 8px 0 0 0;
  }

  .input-tab:last-child {
    border-radius: 0 8px 0 0;
    margin-right: 0;
  }

  .input-tab.active {
    border-right: 2px solid #00d4ff;
    border-bottom: 2px solid rgba(30, 30, 50, 0.95);
    margin-right: -2px;
    margin-bottom: -2px;
  }

  .upload-zone {
    border-radius: 0 0 16px 16px;
  }

  .url-input-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .url-input-wrapper input {
    width: 100%;
  }

  .btn-load-url {
    width: 100%;
  }
}
