/* MediaForge - Sunshine Clean Studio Theme */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  
  --sun-primary: #f97316;
  --sun-hover: #ea580c;
  --sun-gradient: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  --sun-shadow: 0 8px 24px -4px rgba(249, 115, 22, 0.28);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --radius-lg: 1.25rem;
  --radius-md: 0.875rem;
  --radius-sm: 0.5rem;
  
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --card-hover-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* 阳光光晕背景 */
.sun-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.45;
}
.sun-glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, rgba(254, 215, 170, 0.8) 0%, rgba(253, 186, 116, 0.3) 60%, transparent 80%);
}
.sun-glow-2 {
  width: 450px;
  height: 450px;
  top: 100px;
  right: -100px;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.7) 0%, rgba(251, 146, 60, 0.2) 60%, transparent 80%);
}

/* 顶部导航 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.875rem 1.5rem;
}

.nav-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--sun-gradient);
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.status-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.status-indicator.ready {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.status-indicator.standby {
  background: #f59e0b;
}

/* 主容器 */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1040px;
  width: 100%;
  margin: 1.75rem auto 3rem;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 胶囊导航 Tabs */
.tab-capsule {
  display: flex;
  background: #e2e8f0;
  padding: 0.3125rem;
  border-radius: var(--radius-md);
  gap: 0.375rem;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: calc(var(--radius-md) - 0.25rem);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--sun-hover);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

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

/* 主内容卡片 */
.content-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

/* 来源模式选择条 */
.source-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.mode-switch-group {
  display: flex;
  gap: 0.375rem;
}

.mode-pill-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-pill-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.mode-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-right: 0.75rem;
}

/* 拖拽双轨卡片栅格 */
.dual-drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.drop-card {
  background: #fafaf9;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.drop-card:hover {
  background: #fff7ed;
  border-color: #fb923c;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(251, 146, 60, 0.12);
}

.drop-card.dragover {
  background: #ffedd5;
  border-color: #f97316;
  transform: scale(0.99);
}

.drop-card.has-file {
  background: #f0fdf4;
  border-color: #86efac;
  border-style: solid;
}

.file-input-hidden {
  display: none;
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.circle-icon-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.video-badge {
  background: #eff6ff;
  color: #3b82f6;
}

.audio-badge {
  background: #fff1f2;
  color: #f43f5e;
}

.split-badge {
  background: #ecfeff;
  color: #06b6d4;
}

.trim-badge {
  background: #f0fdf4;
  color: #10b981;
}

.drop-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.drop-desc {
  font-size: 0.78125rem;
  color: var(--text-muted);
  max-width: 280px;
}

.file-tag-badge {
  margin-top: 0.875rem;
  background: #ffffff;
  border: 1px solid #86efac;
  color: #15803d;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.875rem;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 远程直链表单 */
.remote-form {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.text-field, .select-field {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.text-field:focus, .select-field:focus {
  border-color: var(--sun-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.remote-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
}

/* 参数配置栏 Ribbon */
.config-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.config-col {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.config-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 按钮行 */
.action-row {
  display: flex;
  gap: 0.75rem;
}

.btn-sun-primary {
  flex: 1;
  background: var(--sun-gradient);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--sun-shadow);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.btn-sun-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px rgba(249, 115, 22, 0.38);
}

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

.btn-outline-cancel {
  background: #ffffff;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-cancel:hover {
  background: #fff1f2;
}

/* 拆分卡片组 */
.single-card {
  margin-bottom: 1.5rem;
}

.split-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.selection-card {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selection-card:hover {
  border-color: #fdba74;
  transform: translateY(-2px);
}

.selection-card.active {
  border-color: var(--sun-primary);
  background: #fffaf5;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.12);
}

.card-top-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.card-summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 裁剪面板 */
.trim-preview-panel {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.video-preview-wrapper {
  background: #000000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 380px;
  display: flex;
  justify-content: center;
}

.video-preview-el {
  max-height: 380px;
  width: 100%;
}

.trim-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.time-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.time-title {
  font-size: 0.78125rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-quick-pin {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

.btn-quick-pin:hover {
  background: #dbeafe;
}

/* 处理进度浮窗 */
.progress-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--sun-hover);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.progress-num {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
}

.progress-track {
  width: 100%;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sun-gradient);
  border-radius: 9999px;
  transition: width 0.2s ease;
}

.progress-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 日志面板卡片 */
.log-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.log-header {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.log-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #10b981;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.log-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
}

.log-btn:hover {
  color: var(--text-main);
}

.log-divider {
  color: var(--border-hover);
}

.log-body {
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #334155;
  background: #f1f5f9;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.6;
}

.log-placeholder {
  color: var(--text-light);
}

/* 页脚 */
.page-footer {
  margin-top: auto;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
}

/* 辅助类 */
.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .nav-stats {
    display: none;
  }
  .content-card {
    padding: 1.25rem;
  }
  .tab-btn {
    font-size: 0.78125rem;
    padding: 0.625rem 0.5rem;
  }
}
