:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #059669;
  --error: #dc2626;
  --border: #dbe3f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 35%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.1), transparent 30%),
    var(--bg);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(640px, 100%);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #eef4ff;
  outline: none;
}

.drop-zone.dragover {
  transform: translateY(-2px);
}

.drop-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-weight: 800;
}

.drop-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.drop-hint,
.file-name {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.file-name {
  color: var(--text);
  font-weight: 600;
}

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

.option-row label {
  font-weight: 600;
}

select {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
}

.primary-btn,
.secondary-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px 18px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
}

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

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-btn {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.secondary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.progress-panel {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.progress-block {
  display: grid;
  gap: 8px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e5edf9;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.25s ease;
}

.progress-fill.convert {
  background: linear-gradient(90deg, #10b981, #059669);
}

.status-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.status-box.success {
  background: #ecfdf5;
  border-color: rgba(5, 150, 105, 0.2);
  color: #065f46;
}

.status-box.error {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.2);
  color: #991b1b;
}

.status-box.info {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.2);
  color: #1e40af;
}

.status-icon {
  font-size: 18px;
  line-height: 1.4;
}

.status-box p {
  margin: 0;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .card {
    padding: 24px 18px;
  }

  h1 {
    font-size: 26px;
  }

  .option-row {
    flex-direction: column;
    align-items: stretch;
  }

  select {
    width: 100%;
  }
}
