:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(0, 173, 181, 0.14), transparent 32%),
    linear-gradient(240deg, rgba(242, 95, 92, 0.13), transparent 34%),
    #f4f6f8;
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.workspace {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #007980;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0;
}

.status {
  min-width: 72px;
  padding: 8px 12px;
  border: 1px solid #d7dee5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 13px;
}

.top-actions {
  display: grid;
  grid-template-columns: auto;
  align-items: center;
}

.input-row,
.result-panel,
.task-panel,
.cookie-panel,
.options-panel {
  border: 1px solid #d7dee5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
}

input,
select,
button {
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 0 12px;
  background: #fff;
  color: #1f2933;
}

button {
  padding: 0 22px;
  border-color: #007980;
  background: #007980;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.result-panel,
.task-panel,
.cookie-panel,
.options-panel {
  padding: 18px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.panel-heading h2 {
  font-size: 18px;
  line-height: 1.35;
}

.panel-heading p {
  margin-top: 4px;
  color: #52606d;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  margin-top: 14px;
}

.qr-login,
.cookie-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

.qr-box {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #cbd5df;
  border-radius: 8px;
  background: #fff;
  color: #52606d;
  text-align: center;
}

.qr-box img {
  width: min(210px, 100%);
  height: auto;
}

textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font: inherit;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-actions button {
  border-color: #cbd5df;
  background: #fff;
  color: #1f2933;
}

.cookie-panel ol {
  margin: 0;
  padding-left: 20px;
  color: #52606d;
}

.cookie-panel p {
  color: #52606d;
}

.login-tip {
  font-size: 13px;
  line-height: 1.6;
}

.cookie-check {
  min-height: 20px;
  font-weight: 700;
}

.video-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
}

.video-head img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: #e8edf2;
}

.video-head h2 {
  font-size: 22px;
  line-height: 1.35;
}

.video-head p,
#taskMessage {
  margin-top: 8px;
  color: #52606d;
}

.controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #52606d;
  font-size: 13px;
  font-weight: 700;
}

.task-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress {
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e8ee;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #f25f5c;
  transition: width 0.2s ease;
}

#fileLink {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: 8px;
  background: #263238;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1100px);
    padding: 24px 0;
  }

  .topbar,
  .input-row,
  .video-head,
  .controls,
  .top-actions,
  .login-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
  }
}
