/* ===== 全局样式 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #f38020;
  --primary-hover: #e06d10;
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== 头部 ===== */
.header {
  text-align: center;
  padding: 48px 24px 24px;
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ===== 容器 ===== */
.container {
  width: 100%;
  max-width: 640px;
  padding: 0 20px;
  flex: 1;
}

/* ===== 上传区域 ===== */
.upload-section {
  margin-bottom: 20px;
}

.drop-zone {
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(243, 128, 32, 0.04);
}

.upload-icon {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.drop-zone p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.browse-link {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.hint {
  font-size: 0.8rem !important;
  margin-top: 8px;
  opacity: 0.6;
}

/* ===== 文件预览 ===== */
.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.file-preview .file-icon {
  font-size: 2rem;
}

.file-preview .file-info {
  flex: 1;
}

.file-preview .file-name {
  font-weight: 600;
  word-break: break-all;
}

.file-preview .file-size {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ===== 音质选项 ===== */
.quality-options {
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.quality-options > label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-item {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.9rem;
}

.radio-item:hover {
  border-color: var(--primary);
}

.radio-item input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.radio-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(243, 128, 32, 0.06);
}

/* ===== 按钮 ===== */
.btn-primary {
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

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

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

/* ===== 进度条 ===== */
.status-section {
  margin-top: 20px;
}

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

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.status-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== 结果 ===== */
.result-section {
  margin-top: 20px;
}

.result-card {
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.result-card .success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.result-card .download-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.result-card .download-link:hover {
  background: var(--primary-hover);
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .header h1 {
    font-size: 1.6rem;
  }

  .drop-zone {
    padding: 32px 16px;
  }

  .radio-group {
    flex-direction: column;
  }
}
