/* ============================================================
 * 截流任务系统 - 前端样式（暖橙色主题，对标线上版）
 * ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #fff4e8 0%, #ffe4cd 50%, #ffd8b8 100%);
  color: #42220f;
  padding: 18px 12px 32px;
}

.card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(255,255,255,0.94);
  border-radius: 22px;
  padding: 18px 14px 24px;
  box-shadow: 0 14px 38px rgba(177, 92, 30, 0.22);
  border: 1px solid rgba(255, 183, 120, 0.55);
}

.tag {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ff7a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 122, 26, 0.28);
}

.main-title { text-align: center; margin: 16px 0 10px; }
.main-title h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.34;
  color: #2d1608;
  letter-spacing: .3px;
}
.main-title strong { color: #ff4d00; }

.note-wrapper { text-align: center; }
.tiny-note {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff0dc;
  color: #a65213;
  font-size: 13px;
  line-height: 1.45;
}

.subtitle {
  margin: 13px 0 8px;
  padding: 11px 12px;
  background: linear-gradient(90deg, #ff7a1a, #ff4d00);
  color: #fff;
  text-align: center;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
}

.timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #e15300;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

.step {
  background: #fffaf4;
  border: 1px solid #ffd9b3;
  border-radius: 18px;
  padding: 14px 12px;
  margin: 14px 0;
}
.step-header {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.step-number {
  flex: 0 0 28px;
  height: 28px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #ff6a00;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.25);
}
.step-title {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  color: #41200b;
  padding-top: 3px;
}

.keywords-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.keyword-btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9px 7px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ffc58c;
  color: #5a2a0b;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(194, 104, 32, 0.1);
  cursor: pointer;
  user-select: none;
}

.keyword-btn:active, .copy-single-btn:active, .submit-btn:active, .clear-btn:active, .remove-file-btn:active {
  transform: scale(.98);
}

.info-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff1df;
  color: #a15012;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.comment-item {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid #ffd3aa;
  border-radius: 13px;
  padding: 9px;
  margin-bottom: 9px;
  box-shadow: 0 4px 12px rgba(172, 92, 28, 0.07);
}
.comment-text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: #4b2208;
  line-height: 1.35;
  word-break: break-all;
}
.copy-single-btn {
  flex: 0 0 auto;
  border: 0;
  background: linear-gradient(180deg, #ff8d2f, #ff6200);
  color: #fff;
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 98, 0, .22);
}

.sub-step {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 10px;
  padding: 10px;
  border-radius: 13px;
  background: #fff2e5;
}
.sub-step-number {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ff7a1a;
  color: #fff;
  font-weight: 900;
}
.sub-step-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  color: #6f310a;
}

.mock-img, .tail-image-container {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #fff2e5;
  border: 1px dashed #ffbc80;
}
.mock-img img, .tail-image-container img {
  display: block;
  width: 100%;
  height: auto;
}
.mock-placeholder, .tail-placeholder {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #ad5a19;
  font-weight: 800;
  line-height: 1.6;
  background: repeating-linear-gradient(45deg, #fff7ef, #fff7ef 10px, #ffead7 10px, #ffead7 20px);
}

/* ========== 上传区：整块可点击 ========== */
.file-input-area {
  position: relative;
  text-align: center;
  background: #fff;
  border: 2px dashed #ffb577;
  border-radius: 16px;
  padding: 18px 10px;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.file-input-area:hover { background: #fffaf4; }
.file-input-area:active { transform: scale(.99); }

#uploadHint {
  font-weight: 900;
  color: #74340d;
  margin-bottom: 8px;
  pointer-events: none;
}
.upload-subhint {
  margin-top: 5px;
  color: #a15012;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

/* 隐藏原生 file input */
#screenshotInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

#fileCount {
  margin-top: 8px;
  color: #ff4d00;
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
}

.selected-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}
.selected-tip {
  flex: 1;
  font-size: 12px;
  color: #a15012;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
}
.clear-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffe1c7;
  color: #a34d0f;
  font-weight: 800;
  cursor: pointer;
  display: none;
}

/* 缩略图 5 宫格预览 */
.file-preview-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 11px;
}
.file-preview-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff1df;
  border: 1px solid #ffd0a5;
  cursor: default;
}
.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.remove-file-btn {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #ff7a1a, #ff3d00);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(255, 80, 0, .25);
}

/* 尾部图片区 */
.tail-image-section { text-align: center; margin-top: 16px; }
.tail-image-title {
  color: #54240a;
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 10px;
}

hr {
  border: 0;
  border-top: 1px solid #ffe0c2;
  margin: 18px 0 12px;
}
.footer {
  text-align: center;
  color: #a65312;
  font-size: 13px;
  line-height: 1.5;
}

/* 复制提示 toast */
.copy-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
}
.copy-toast.show { opacity: 1; }

/* 临时复制 textarea */
#tempCopy {
  position: fixed;
  left: -9999px;
  top: -9999px;
  opacity: 0;
}

/* ========== VIP 吃瓜群区 ========== */
.vip-section {
  text-align: center;
  margin-top: 16px;
  padding: 16px 12px;
  background: linear-gradient(135deg, #fff5e8, #ffe8d0);
  border: 1px solid #ffc58c;
  border-radius: 18px;
}
.vip-title {
  font-size: 16px;
  font-weight: 900;
  color: #ff4d00;
  margin-bottom: 12px;
}
.vip-image-container {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 12px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed #ffbc80;
}
.vip-image-container img {
  display: block;
  width: 100%;
  height: auto;
}
.vip-placeholder {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #ad5a19;
  font-weight: 800;
  line-height: 1.6;
  background: repeating-linear-gradient(45deg, #fff7ef, #fff7ef 10px, #ffead7 10px, #ffead7 20px);
}
.vip-btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(180deg, #ff8d2f, #ff4d00);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(255, 77, 0, 0.3);
}
.vip-btn:active { transform: scale(.97); }

/* ========== 客服悬浮窗 ========== */
.kefu-float {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 9998;
}
.kefu-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8d2f, #ff4d00);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 77, 0, 0.35);
  transition: transform .2s;
}
.kefu-btn:active { transform: scale(.92); }
.kefu-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 220px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #ffd9b3;
  box-shadow: 0 12px 32px rgba(177, 92, 30, 0.22);
  overflow: hidden;
  display: none;
}
.kefu-panel.show { display: block; }
.kefu-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(90deg, #ff7a1a, #ff4d00);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.kefu-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.kefu-welcome {
  padding: 14px;
  font-size: 13px;
  color: #5a2a0b;
  line-height: 1.5;
  text-align: center;
}
.kefu-contact-btn {
  display: block;
  margin: 0 14px 14px;
  padding: 10px;
  text-align: center;
  background: linear-gradient(180deg, #ff8d2f, #ff6200);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
}

/* ========== 图片查看灯箱 ========== */
.img-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  -webkit-tap-highlight-color: transparent;
}
.img-lightbox.show { display: flex; }
.img-lightbox img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 26px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
  z-index: 10001;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.35); }

/* 响应式 */
@media (max-width: 360px) {
  .main-title h1 { font-size: 22px; }
  .keywords-grid { grid-template-columns: 1fr; }
  .file-preview-list { grid-template-columns: repeat(4, 1fr); }
}
