:root {
  color-scheme: light;
  --ink: #17151f;
  --muted: #6e6877;
  --paper: #fbf9ff;
  --panel: rgba(255, 255, 255, .82);
  --line: rgba(53, 41, 75, .13);
  --violet: #6c4cf1;
  --violet-dark: #4a2fc0;
  --violet-soft: #eee9ff;
  --mint: #0f9c75;
  --red: #c23e57;
  --shadow: 0 24px 70px rgba(51, 35, 91, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(133, 101, 255, .18), transparent 30rem),
    radial-gradient(circle at 92% 14%, rgba(64, 202, 159, .10), transparent 25rem),
    #f5f2fa;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; font-weight: 900; background: linear-gradient(145deg, #8f75ff, #5635df); box-shadow: 0 8px 24px rgba(98, 66, 232, .25); }
.brand-mark.large { width: 52px; height: 52px; font-size: 22px; border-radius: 16px; margin-bottom: 20px; }
.brand strong { font-size: 16px; letter-spacing: .02em; }
.brand em { margin-left: 7px; color: var(--violet); font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .12em; }
.server-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.server-state span { width: 8px; height: 8px; border-radius: 50%; background: #a6a0af; }
.server-state.online span { background: #20b789; box-shadow: 0 0 0 5px rgba(32, 183, 137, .12); }

.ghost-button, .text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 9px 12px; border-radius: 10px; }
.ghost-button:hover, .text-button:hover { color: var(--violet); background: var(--violet-soft); }
.feature-link { text-decoration: none; }

.hero { padding: 72px 0 58px; max-width: 900px; }
.eyebrow { display: block; color: var(--violet); font-weight: 900; font-size: 11px; letter-spacing: .2em; margin-bottom: 15px; }
.hero h1 { font-size: clamp(42px, 7vw, 80px); line-height: .98; letter-spacing: -.065em; margin: 0; }
.hero h1 span { color: var(--violet); }
.hero > p { max-width: 680px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.8; margin: 28px 0; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-pills span { border: 1px solid var(--line); background: rgba(255,255,255,.54); border-radius: 99px; padding: 8px 12px; color: #574f60; font-size: 13px; }
.feature-callout { display: inline-flex; align-items: center; gap: 11px; margin-top: 22px; padding: 12px 15px; border: 1px solid rgba(108,76,241,.2); border-radius: 14px; color: var(--violet-dark); background: rgba(255,255,255,.66); text-decoration: none; font-size: 13px; font-weight: 800; }
.feature-callout b { padding: 4px 7px; border-radius: 7px; color: white; background: var(--violet); font-size: 9px; letter-spacing: .08em; }

.workspace, .jobs-section, .info-panel { background: var(--panel); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(20px); border-radius: 28px; padding: 32px; margin-bottom: 26px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading > div, .info-panel > div:first-child { display: flex; align-items: center; gap: 12px; }
.section-heading h2, .info-panel h2 { font-size: 22px; margin: 0; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.step { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--violet-soft); color: var(--violet); font-size: 11px; font-weight: 900; }

.control-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); gap: 18px; }
.field { display: block; }
.field > span, .time-card > span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.field select, .field input { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; outline: none; color: var(--ink); background: #fff; }
.field select:focus, .field input:focus { border-color: rgba(108,76,241,.7); box-shadow: 0 0 0 4px rgba(108,76,241,.10); }
.field small { display: block; color: var(--muted); margin-top: 7px; }
.time-card { border-radius: 16px; padding: 16px 18px; color: white; background: linear-gradient(135deg, #7658f1, #4c31bd); }
.time-card > span { color: rgba(255,255,255,.72); }
.time-card strong, .time-card b { display: block; }
.time-card strong { font-size: 14px; }
.time-card b { font-size: 18px; margin-top: 5px; }

.drop-zone { min-height: 178px; margin-top: 20px; border: 1.5px dashed rgba(91,69,149,.36); border-radius: 20px; background: rgba(246,243,255,.75); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: .2s ease; padding: 24px; }
.drop-zone:hover, .drop-zone.drag { border-color: var(--violet); background: #f0ebff; transform: translateY(-1px); }
.drop-zone input { display: none; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: white; color: var(--violet); font-size: 25px; box-shadow: 0 10px 28px rgba(72,51,125,.12); margin-bottom: 13px; }
.drop-zone strong { font-size: 17px; }
.drop-zone > span:last-child { color: var(--muted); font-size: 12px; margin-top: 7px; }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.selection-bar > span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.primary-button { border: 0; border-radius: 13px; padding: 13px 19px; color: white; font-weight: 800; background: linear-gradient(135deg, #7658f1, #5134c5); box-shadow: 0 10px 24px rgba(89,55,207,.2); cursor: pointer; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(89,55,207,.26); }
.primary-button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button.full { width: 100%; margin-top: 7px; }

.empty-state { border: 1px dashed var(--line); border-radius: 18px; padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state > span { display: block; color: var(--violet); font-size: 30px; }
.empty-state strong { display: block; color: var(--ink); margin-top: 8px; }
.empty-state p { font-size: 13px; margin: 7px 0 0; }
.job-list { display: grid; gap: 12px; }
.job-card { border: 1px solid var(--line); border-radius: 17px; padding: 17px 18px; background: rgba(255,255,255,.7); }
.job-top { display: flex; align-items: flex-start; gap: 14px; }
.job-file { min-width: 0; flex: 1; }
.job-file strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.job-file span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.status-badge { flex: 0 0 auto; border-radius: 99px; padding: 7px 10px; font-size: 11px; font-weight: 900; background: #efeaf9; color: #685b78; }
.status-badge.completed { background: #e5f7f1; color: #087956; }
.status-badge.failed { background: #ffe9ed; color: var(--red); }
.status-badge.awaiting_track { background: #fff1d6; color: #9a5b00; }
.progress-track { height: 7px; margin-top: 15px; border-radius: 99px; background: #eeeaf3; overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8369f3, #52cba3); transition: width .35s ease; }
.job-bottom { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 10px; }
.job-message { color: var(--muted); font-size: 12px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.downloads a { color: var(--violet-dark); background: var(--violet-soft); border-radius: 9px; padding: 7px 10px; text-decoration: none; font-size: 12px; font-weight: 800; }
.resume-button { border: 0; border-radius: 9px; padding: 7px 11px; color: white; background: var(--violet); cursor: pointer; font-size: 12px; font-weight: 800; }
.resume-button:hover { background: var(--violet-dark); }
.resume-button:disabled { opacity: .55; cursor: wait; }
.track-picker { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px; border: 1px solid #e9def7; border-radius: 12px; background: #fbf8ff; }
.track-picker select { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; color: var(--ink); background: white; font: inherit; font-size: 12px; }
.track-confirm-button { flex: 0 0 auto; }

.info-panel { margin-top: 26px; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.info-grid article { border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: rgba(255,255,255,.56); }
.info-grid b { font-size: 14px; }
.info-grid p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 8px 0 0; }
.fine-print { color: var(--muted); font-size: 12px; margin: 18px 0 0; }
footer { padding: 28px 0 48px; text-align: center; color: #8b8493; font-size: 12px; }

.login-layer { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 22px; background: rgba(244,240,251,.92); backdrop-filter: blur(18px); }
.login-layer.hidden { display: none; }
.login-card { width: min(430px, 100%); border: 1px solid rgba(255,255,255,.8); border-radius: 26px; padding: 32px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.login-card h2 { font-size: 28px; letter-spacing: -.04em; margin: 0 0 10px; }
.login-card > p { color: var(--muted); line-height: 1.65; margin: 0 0 22px; }
.form-error { min-height: 20px; color: var(--red) !important; font-size: 12px; margin: 8px 0 0 !important; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; color: white; background: #251d37; border-radius: 12px; padding: 11px 15px; font-size: 13px; transition: .2s; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .hero { padding-top: 46px; }
  .control-grid, .info-grid { grid-template-columns: 1fr 1fr; }
  .workspace, .jobs-section, .info-panel { padding: 24px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1120px); }
  .topbar { height: 68px; }
  .brand em, .server-state { display: none; }
  .hero { padding: 36px 4px 38px; }
  .hero h1 { font-size: 43px; }
  .hero > p { font-size: 15px; margin: 20px 0; }
  .workspace, .jobs-section, .info-panel { padding: 19px; border-radius: 21px; }
  .section-heading { align-items: flex-start; }
  .section-heading > p { display: none; }
  .control-grid, .info-grid { grid-template-columns: 1fr; }
  .selection-bar { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .job-top, .job-bottom { align-items: flex-start; flex-direction: column; }
  .downloads { justify-content: flex-start; }
  .track-picker { align-items: stretch; flex-direction: column; }
  .login-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
