/* ===== 全局 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f1115;
  --bg-elev: #181b22;
  --bg-card: #1d2129;
  --border: #2a2f3a;
  --border-hover: #3a4050;
  --text: #e6e8ee;
  --text-dim: #9aa0ae;
  --text-muted: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;
  --progress-bg: #2a2f3a;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding: 0 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 0 32px;
}

.hidden {
  display: none !important;
}

/* ===== 头部 ===== */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-dim);
  margin-top: 10px;
  font-size: 15px;
}

/* ===== 上传区域 ===== */
.dropzone {
  border: 2px dashed var(--border-hover);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-elev);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.dropzone:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.04);
}

.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.01);
}

.upload-icon {
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.drop-text {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.drop-text .highlight {
  color: var(--accent);
  font-weight: 600;
}

.drop-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== 文件列表 ===== */
.file-list-section {
  margin-top: 28px;
}

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

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.btn-text:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.file-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item.converting {
  background: rgba(59, 130, 246, 0.06);
}

.file-item.done {
  background: rgba(16, 185, 129, 0.04);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.file-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
}

.format-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.file-progress {
  width: 180px;
  flex-shrink: 0;
}

.progress-bar {
  height: 6px;
  background: var(--progress-bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.file-item.done .progress-fill {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.file-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-download {
  padding: 7px 16px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-download:hover {
  background: var(--success-hover);
}

.btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-remove:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.status-badge.converting {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.status-badge.done {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ===== 设置区域 ===== */
.settings {
  margin-top: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-item label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa0ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s;
  min-width: 150px;
}

.select:hover,
.select:focus {
  border-color: var(--accent);
}

.btn-primary {
  padding: 11px 32px;
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  margin-left: auto;
  align-self: center;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

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

/* ===== 加载遮罩 ===== */
.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-content {
  text-align: center;
  color: var(--text);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

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

.loading-content p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  padding: 12px 22px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 90%;
}

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

/* ===== 底部 ===== */
.footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .container {
    padding: 32px 0 24px;
  }

  .dropzone {
    padding: 40px 16px;
  }

  .upload-icon {
    width: 72px;
    height: 72px;
  }

  .upload-icon svg {
    width: 52px;
    height: 52px;
  }

  .file-item {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 10px;
  }

  .file-progress {
    width: 100%;
    order: 3;
  }

  .progress-text {
    text-align: left;
  }

  .settings {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .setting-item {
    width: 100%;
  }

  .select {
    width: 100%;
  }

  .btn-primary {
    margin-left: 0;
    width: 100%;
  }
}


/* ===== 品牌 LOGO（音转）===== */
.header{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:16px}
.header .subtitle{flex:0 0 100%}
.yz-brand{height:40px;width:auto;display:block}
@media (max-width:480px){.yz-brand{height:30px}.header{column-gap:12px}}
