/* Spine 版本转换 - 客户端样式 */
:root {
  --bg-dark: #0f0f12;
  --bg-card: #18181c;
  --bg-elevated: #1e1e24;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --success: #22c55e;
  --error: #ef4444;
  --border: #27272a;
  --radius: 12px;
  --font-sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.08), transparent);
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.notice-banner {
  background: rgba(255, 248, 220, 0.92);
  border: 1px solid #b8860b;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #8b6914;
}

.main {
  flex: 1;
}

/* 上传区域 */
.upload-section {
  margin-bottom: 1.5rem;
}

.version-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.version-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.version-select {
  flex: 1;
  max-width: 160px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.version-select:hover,
.version-select:focus {
  border-color: var(--accent);
  outline: none;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-card);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.9;
}

.drop-text {
  font-size: 1rem;
  font-weight: 500;
}

.drop-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 进度区域 */
.progress-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.task-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.task-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.task-id {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.completed {
  background: var(--success);
  animation: none;
}

.status-indicator.failed {
  background: var(--error);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-fill.indeterminate {
  width: 40%;
  animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* 结果区域 */
.result-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  text-align: center;
}

.result-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.success-icon {
  width: 56px;
  height: 56px;
  color: var(--success);
}

.result-success p {
  font-size: 1.1rem;
  font-weight: 500;
}

.download-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* 错误区域 */
.error-section {
  margin-top: 1rem;
}

.error-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
}

.error-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.convert-again-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.convert-again-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.error-icon {
  font-size: 1.25rem;
  color: var(--error);
}

.error-text {
  color: var(--error);
  font-size: 0.9rem;
}

.footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer .ad-link {
  margin-bottom: 0.5rem;
}

.footer .ad-link a {
  color: var(--accent);
  text-decoration: none;
}

.footer .ad-link a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}
