:root {
  --bg: #f8f6f3;
  --card: #ffffff;
  --border: #e5e1da;
  --text: #2d2a26;
  --text-sub: #8a857d;
  --primary: #e95f6d;
  --primary-hover: #d94d5b;
  --accent: #f5a623;
  --success: #34c759;
  --error: #ff3b30;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(45, 42, 38, 0.08);
}

[data-theme="dark"] {
  --bg: #1c1a17;
  --card: #262320;
  --border: #3a3733;
  --text: #e8e4df;
  --text-sub: #8a857d;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon { font-size: 24px; }

.logo-en {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 6px;
}

.header-actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 10px 24px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233, 95, 109, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-sm { padding: 4px 10px; font-size: 12px; }

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.notice-bar {
  background: linear-gradient(90deg, rgba(233,95,109,.1), rgba(245,166,35,.1));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text);
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover { border-color: var(--primary); }

.drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(233, 95, 109, 0.04);
  transform: scale(1.005);
}

.drop-zone.disabled { pointer-events: none; opacity: 0.5; }

.drop-inner { position: relative; z-index: 1; }

.mouse-avatar {
  width: 120px;
  height: 100px;
  margin: 0 auto 20px;
  position: relative;
  transition: transform 0.3s;
}

@keyframes mouseIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mouse-avatar { animation: mouseIdle 2.5s ease-in-out infinite; }

.mouse-body {
  width: 90px;
  height: 72px;
  background: linear-gradient(180deg, #f5c89e, #e8b183);
  border-radius: 45px 45px 38px 38px;
  position: relative;
  margin: 15px auto 0;
  box-shadow: inset 0 -6px 12px rgba(180, 120, 70, 0.2);
}

.mouse-ear {
  position: absolute;
  width: 34px;
  height: 34px;
  background: linear-gradient(180deg, #f5c89e, #e8b183);
  border-radius: 50%;
  top: -12px;
  box-shadow: inset 0 -3px 6px rgba(180, 120, 70, 0.15);
}

.mouse-ear::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #f7a8b8;
  border-radius: 50%;
  top: 8px;
  left: 8px;
}

.mouse-ear-l { left: 4px; transform: rotate(-15deg); }
.mouse-ear-r { right: 4px; transform: rotate(15deg); }

.mouse-face { position: relative; }

.mouse-eye {
  position: absolute;
  width: 10px;
  height: 13px;
  background: #2d2a26;
  border-radius: 50%;
  top: 22px;
}

.mouse-eye-l { left: 22px; }
.mouse-eye-r { right: 22px; }

.mouse-nose {
  position: absolute;
  width: 10px;
  height: 8px;
  background: #e86a7e;
  border-radius: 50%;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.mouse-mouth {
  position: absolute;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid #2d2a26;
  border-radius: 0 0 12px 12px;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
}

.drop-zone.happy .mouse-body { animation: happy 0.6s ease; }

@keyframes happy {
  0% { transform: scale(1); }
  30% { transform: scale(1.1) rotate(-3deg); }
  60% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1); }
}

.drop-zone.loading .mouse-body { animation: loading 1s ease-in-out infinite; }

@keyframes loading {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(6px) scale(0.96); }
}

.drop-zone.error .mouse-body { animation: shake 0.5s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.drop-zone h2 { margin: 8px 0 6px; font-size: 20px; }

.drop-sub { color: var(--text-sub); margin-bottom: 20px; }

.queue-section {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

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

.queue-header h2 { font-size: 16px; }

.queue-count { color: var(--text-sub); font-size: 13px; }

.queue-list, .result-list { list-style: none; }

.queue-item, .result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.queue-item:last-child, .result-item:last-child { border-bottom: none; }

.queue-file-icon { font-size: 20px; flex-shrink: 0; }

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

.queue-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.target-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  max-width: 180px;
}

.queue-item-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-convert {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-convert:hover:not(:disabled) { background: var(--primary-hover); }
.btn-convert:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-remove {
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}

.btn-remove:hover { color: var(--error); }

.result-item { flex-wrap: wrap; }

.result-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.result-status.success { background: rgba(52, 199, 89, 0.15); }
.result-status.failed { background: rgba(255, 59, 48, 0.15); }

.result-status .icon { font-style: normal; }

.result-item.success .result-status .icon { color: var(--success); }
.result-item.failed .result-status .icon { color: var(--error); }

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

.result-actions { display: flex; gap: 8px; }

.result-meta { color: var(--text-sub); font-size: 12px; }

.btn-download {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-download:hover { filter: brightness(1.1); }

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

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

.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-sub);
  font-size: 14px;
}

.footer-small { font-size: 12px; margin-top: 4px; }

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}

@keyframes toastIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.info { border-left: 4px solid var(--accent); }

@media (max-width: 640px) {
  .main { padding: 16px; }
  .drop-zone { padding: 32px 16px; }
  .queue-item { flex-wrap: wrap; }
  .target-select { max-width: none; }
  .header-inner { padding: 0 8px; }
  .logo { font-size: 16px; }
  .logo-en { display: none; }
}