:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --border: #e5e7eb;
  --success: #059669;
  --error: #dc2626;
  --shadow: 0 10px 40px 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;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 40%);
  color: var(--text);
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.drop-zone {
  border: 2px dashed #c7d2fe;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafbff;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #eef2ff;
}

.drop-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.drop-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.drop-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 10px;
  font-size: 0.95rem;
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
}

.format-row {
  margin-top: 24px;
}

.format-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.format-options {
  display: flex;
  gap: 12px;
}

.format-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.format-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef2ff;
}

.primary-btn {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.primary-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-wrap {
  margin-top: 20px;
}

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 999px;
  transition: width 0.2s;
}

.progress-text {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.message.error {
  background: #fef2f2;
  color: var(--error);
}

.message.success {
  background: #ecfdf5;
  color: var(--success);
}

.download-area {
  margin-top: 16px;
  text-align: center;
}

.download-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--success);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.download-btn:hover {
  background: #047857;
}

.footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer .tips {
  margin-top: 10px;
  line-height: 1.6;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .format-options {
    flex-direction: column;
  }

  .page {
    padding-top: 28px;
  }
}
