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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #f0f4ff 0%, #e8f0fe 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #1f2a44;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}
header h1 { font-size: 1.9rem; }
header .sub { color: #5a6a8a; margin-top: .4rem; }

main {
  flex: 1;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding-bottom: 2rem;
}

.tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.tabs button {
  flex: 1;
  padding: .7rem 0;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #4a5a7a;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .08);
}
.tabs button.active {
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
}

#workspace {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(31, 42, 68, .1);
}

.dropzone {
  border: 2px dashed #b8c6e0;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragging { border-color: #3b82f6; background: #f0f6ff; }
.dropzone .hint { color: #8a97b5; font-size: .85rem; margin-top: .8rem; }

.controls {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.2rem;
}
.controls select {
  flex: 1;
  padding: .6rem .8rem;
  border: 1px solid #c9d4ea;
  border-radius: 8px;
  font-size: 1rem;
}
.controls button {
  padding: .6rem 1.4rem;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.controls button:disabled { background: #b8c6e0; cursor: not-allowed; }

.turnstile { margin-top: 1rem; display: flex; justify-content: center; }

.progress {
  margin-top: 1.2rem;
}
.progress.hidden { display: none; }
.bar {
  height: 8px;
  background: #3b82f6;
  border-radius: 4px;
  width: 0;
  transition: width .3s;
}
.progress span { display: block; margin-top: .4rem; color: #5a6a8a; font-size: .9rem; }

.results {
  list-style: none;
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.results li {
  background: #f5f8ff;
  border-radius: 8px;
  padding: .5rem .8rem;
}
.download-link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}
.download-link:hover { text-decoration: underline; }

footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: #7a87a5;
  font-size: .85rem;
  line-height: 1.7;
}
