/* ==========================================================================
   首页 · 作品链接提交
   ========================================================================== */

.task-page {
  --task-brick: #b4432c;
  --task-amber: #9a5a0b;
  --task-sage-bg: #edf1e1;
  --task-sage-text: #52663a;
  --task-sage-strong: #6f854d;

  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(201, 106, 8, 0.08), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(82, 102, 58, 0.06), transparent 28%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

.task-page::before {
  content: none;
}

.task-shell {
  width: min(560px, 100%);
  min-height: calc(100vh - 68px);
  margin: 30px auto 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(74, 57, 30, 0.1);
}

.task-content {
  padding: 25px 23px 36px;
}

/* ---------- 顶部提示 ---------- */
.task-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--task-brick);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.66;
  letter-spacing: 0.005em;
}

.notice-bell {
  width: 21px;
  height: 21px;
  margin-top: 5px;
  flex: none;
}

.notice-bell svg {
  width: 100%;
  height: 100%;
}

.notice-bracket {
  white-space: normal;
}

.task-refresh-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  color: var(--task-amber);
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.2s;
}

.refresh-btn:hover {
  color: #784506;
}

.refresh-btn svg {
  width: 14px;
  height: 14px;
}

.refresh-btn.is-spinning svg {
  animation: spin 0.7s linear infinite;
}

.task-rule {
  height: 1px;
  margin: 13px 0;
  background: var(--line-soft);
}

.task-stats {
  display: grid;
  gap: 7px;
  margin-top: 17px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf6ea;
}

.task-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--task-brick);
  font-size: 18px;
  line-height: 1.5;
}

.task-stat-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.task-stat strong {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- 绿色操作提示 ---------- */
.task-tip {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 25px 0 29px;
  padding: 15px 39px 15px 15px;
  border-radius: 6px;
  background: var(--task-sage-bg);
  color: var(--task-sage-text);
  font-size: 15.5px;
  line-height: 1.9;
}

.task-tip.is-hidden {
  display: none;
}

.tip-check {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-top: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--task-sage-strong);
  color: #fdfbf5;
}

.tip-check svg {
  width: 14px;
  height: 14px;
}

.task-tip p {
  min-width: 0;
}

.tip-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 21px;
  border-radius: 3px;
  background: var(--task-amber);
  color: #fff8ef;
  font-size: 13px;
  line-height: 1;
  vertical-align: 1px;
}

.tip-arrow {
  width: 21px;
  padding-bottom: 1px;
}

.tip-dots {
  padding: 0 4px 4px;
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1;
}

.tip-close {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 24px;
  height: 24px;
  color: #b1a894;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.2s;
}

.tip-close:hover {
  color: #6b6558;
}

/* ---------- 表单 ---------- */
.task-field + .task-field {
  margin-top: 12px;
}

.task-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.work-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 12px;
  border: 1px solid #d9d1c1;
  border-radius: 3px;
  background: #fdfbf5;
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.work-input::placeholder {
  color: #b0a896;
}

.work-input:focus {
  outline: none;
  border-color: var(--task-amber);
  box-shadow: 0 0 0 2px rgba(154, 90, 11, 0.14);
}

.work-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.1);
}

.task-error {
  min-height: 16px;
  margin-top: 4px;
  color: #a8352a;
  font-size: 12.5px;
  line-height: 1.55;
}

.task-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 156px;
  height: 45px;
  margin-top: 1px;
  padding: 0 20px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.task-submit:hover {
  background: #2c2a24;
  box-shadow: 0 8px 20px rgba(23, 23, 19, 0.16);
}

.task-submit:active {
  transform: scale(0.99);
}

.task-submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.task-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.task-submit.is-loading .task-spinner {
  display: block;
}

/* ---------- 成功状态 ---------- */
.task-success {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #d5dec2;
  border-radius: 6px;
  background: #eff3e4;
  color: var(--task-sage-text);
  animation: fadeUp 0.35s var(--ease) both;
}

.success-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.success-check {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 50%;
  background: var(--task-sage-strong);
  color: #fdfbf5;
}

.success-check svg {
  width: 16px;
  height: 16px;
}

.task-success h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.task-success p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.7;
}

.success-code {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0 37px;
  font-size: 11px;
  color: #7d8b62;
}

.success-code strong {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #40552d;
}

.success-again {
  margin: 13px 0 0 37px;
  padding: 0;
  border-bottom: 1px solid currentColor;
  color: var(--task-sage-text);
  font-size: 12px;
  line-height: 1.6;
}

.success-again:hover {
  color: #394a28;
}

/* ---------- 页脚 ---------- */
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 15px 3px 28px;
  color: var(--muted);
  font-size: 10.5px;
}

.task-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
}

.task-footer a {
  transition: color 0.2s;
}

.task-footer a:hover {
  color: var(--ink);
}

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  .task-shell {
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .task-content {
    padding: 22px 18px 34px;
  }

  .task-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 18px 24px;
    background: var(--paper);
  }

  .task-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .task-notice {
    gap: 7px;
    font-size: 17px;
    line-height: 1.68;
  }

  .notice-bell {
    width: 19px;
    height: 19px;
    margin-top: 5px;
  }

  .task-tip {
    font-size: 14.5px;
    padding-left: 13px;
  }
}
