/* 发视频得会员 - 小清新浅色 */
:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --surface2: #f0f4f8;
  --text: #2d3748;
  --text-muted: #718096;
  --accent: #38b2ac;
  --accent-hover: #319795;
  --accent-light: #e6fffa;
  --success: #48bb78;
  --warning: #ecc94b;
  --danger: #f56565;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --nav-h: 56px;
  --footer-contact-h: 48px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + var(--footer-contact-h));
}

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部标题区 */
.header {
  background: linear-gradient(165deg, #e6fffa 0%, #f0fdfa 40%, #fff 85%);
  padding: 20px 20px 24px;
  text-align: center;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 20px rgba(56, 178, 172, 0.08);
}

.header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.02em;
}

.main { flex: 1; padding: 24px 18px 32px; }

.main--home { padding: 20px 18px 36px; }

.home-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 22px;
  line-height: 1.5;
}

.entry-list { display: flex; flex-direction: column; gap: 14px; }

.entry-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.entry-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  color: #fff;
  white-space: nowrap;
}
.entry-card.material .entry-badge { background: linear-gradient(135deg, #2c7a7b 0%, #319795 100%); }
.entry-card.create .entry-badge { background: linear-gradient(135deg, #276749 0%, #2f8558 100%); }

.entry-card:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08); border-color: rgba(56, 178, 172, 0.2); }
.entry-card:active { transform: scale(0.99); }

.entry-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  color: #fff;
}
.entry-card.material .entry-num { background: linear-gradient(135deg, #2c7a7b 0%, #319795 100%); }
.entry-card.create .entry-num { background: linear-gradient(135deg, #276749 0%, #2f8558 100%); }

.entry-body { flex: 1; min-width: 0; }

.entry-card .entry-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.entry-card .entry-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.entry-card.material .entry-title { color: #2c7a7b; }
.entry-card.create .entry-title { color: #276749; }

/* 首页操作区 */
.home-actions {
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.home-btn-row {
  display: flex;
  gap: 12px;
}

.home-btn {
  flex: 1;
  display: block;
  text-align: center;
  padding: 14px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.home-btn:active { transform: scale(0.98); }

.home-btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(56, 178, 172, 0.35);
}

.home-btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.home-btn-secondary:hover, .home-btn-secondary:focus { background: var(--accent-light); }

.home-activity-row { margin-top: 14px; }
.home-btn-activity,
.home-btn-activity-secondary {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.home-btn-activity:hover,
.home-btn-activity-secondary:hover { background: var(--accent-light); }
.home-btn-activity:active,
.home-btn-activity-secondary:active { opacity: 0.9; }
.home-activity-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.home-btn-activity-secondary {
  flex: 1;
}

.activity-modal-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.activity-modal-mask.show { display: flex; }
.activity-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
}
.activity-modal img { max-width: 280px; width: 100%; height: auto; display: block; vertical-align: top; }
.activity-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.activity-modal-close:active { opacity: 0.8; }

.requirements-modal-content { padding: 44px 24px 24px; min-width: 280px; }
.requirements-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.requirements-list { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.requirements-list li { margin-bottom: 10px; }

.home-btn {
  flex: 1;
  display: block;
  text-align: center;
  padding: 14px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.home-btn:active { opacity: 0.9; }

.back-bar {
  padding: 12px 0 16px;
  font-size: 0.9rem;
}

.back-bar a {
  color: var(--accent);
  text-decoration: none;
}

.back-bar a::before { content: "← "; }

/* 通用 section */
.section { margin-bottom: 24px; }

.section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.hint { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }

/* 视频列表 */
.video-list { display: flex; flex-direction: column; gap: 12px; }

.video-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.video-card .title { font-weight: 600; margin-bottom: 4px; color: var(--text); }

.video-card .desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }

.video-card .btn-download {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.video-card .btn-download:hover, .video-card .btn-download:focus { background: var(--accent-hover); }

/* 素材列表（图片/视频分类下的每一项，紧凑） */
.material-list { display: flex; flex-direction: column; gap: 8px; }

.material-order-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--accent-light);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 3px solid var(--accent);
}

.material-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.material-title { font-weight: 600; margin-bottom: 3px; font-size: 0.9rem; color: var(--text); }

.material-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }

.material-row {
  font-size: 0.8rem;
  margin-bottom: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.material-label { color: var(--text-muted); flex-shrink: 0; }

.material-ref { flex: 1; word-break: break-all; color: var(--text); }

.btn-copy-ref {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.btn-copy-ref:active { opacity: 0.8; }

/* 图1/图2/图3 等操作区：横向排列、可换行，更紧凑 */
.material-actions-wrap {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.material-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.material-card .btn-download,
.material-card .btn-preview {
  display: inline-block;
  text-align: center;
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.material-card .btn-download { background: var(--accent); color: #fff; }
.material-card .btn-preview { background: var(--surface2); color: var(--text); border: 1px solid #e2e8f0; }
.material-card .btn-download:active, .material-card .btn-preview:active { opacity: 0.9; }
.material-card .btn-download.btn-downloading { opacity: 0.8; cursor: wait; pointer-events: none; }
.material-card .url-label { font-size: 0.78rem; color: var(--text-muted); }
.material-card .no-url { font-size: 0.8rem; color: var(--text-muted); }

/* 跳转按钮 */
.cta-box { margin-top: 20px; }

.cta-box .btn {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cta-box .btn:active { opacity: 0.9; }

/* 表单 */
.form-section .form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.field { margin-bottom: 18px; }

.field:last-of-type { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

.required { color: var(--danger); }
.optional { color: var(--text-muted); font-weight: normal; }

.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  transition: border-color 0.2s;
}

.field input::placeholder { color: var(--text-muted); }

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}

.radio-group { display: flex; flex-direction: column; gap: 10px; }

.radio-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.radio-wrap input { width: auto; margin-top: 3px; accent-color: var(--accent); }

.radio-wrap input:checked + span { color: var(--text); }

.btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn:hover, .btn:focus { opacity: 0.95; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover, .btn-ghost:focus { opacity: 0.9; background: var(--surface); }

.claim-confirm-mask {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.claim-confirm-mask.show { display: flex; }
.claim-confirm-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 100%;
  width: 320px;
}
.claim-confirm-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 16px; color: var(--text); }
.claim-confirm-list {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.claim-confirm-list li { margin-bottom: 8px; }
.claim-confirm-btns {
  display: flex;
  gap: 12px;
}
.claim-confirm-btns .btn { flex: 1; width: auto; }

.rule-list { padding-left: 20px; font-size: 0.9rem; color: var(--text-muted); }

.rule-list li { margin-bottom: 8px; }

/* 自己创作页 - 参考视频（最多两行，多则横向滑动） */
.reference-videos-wrap { margin-bottom: 24px; }
.reference-videos-wrap .reference-videos-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.reference-videos-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -18px;
  padding: 0 18px 8px;
}
.reference-videos-list {
  display: flex;
  flex-direction: row;
  gap: 12px;
  width: max-content;
}
.ref-video-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 160px;
  flex-shrink: 0;
}
.ref-video-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ref-video-card:active { transform: scale(0.98); }
.ref-video-cover {
  width: 100%;
  padding-top: 56.25%;
  background: var(--surface2) center/cover no-repeat;
}
.ref-video-card-no-cover .ref-video-cover {
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  height: 96px;
}
.ref-video-card-no-cover .ref-video-cover::before { content: "▶"; font-size: 1.8rem; color: var(--text-muted); }
.ref-video-title { font-size: 0.9rem; padding: 10px 8px 6px; text-align: center; line-height: 1.35; width: 100%; box-sizing: border-box; }
.ref-video-play { font-size: 0.75rem; color: var(--accent); padding-bottom: 8px; }

/* 自己创作页 - 上下紧凑 */
.main--create { padding: 16px 18px 24px; }
.main--create .back-bar { padding: 8px 0 10px; }
.main--create .reference-videos-wrap { margin-bottom: 14px; }
.main--create .reference-videos-wrap .reference-videos-title { margin-bottom: 8px; }
.main--create .section { margin-bottom: 14px; }
.main--create .section h2 { margin-bottom: 8px; }
.main--create .rule-list li { margin-bottom: 6px; }
.main--create .cta-box { margin-top: 12px; }

.footer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  text-align: center;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid #e2e8f0;
  z-index: 998;
}
.footer-contact {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.footer-contact:hover, .footer-contact:focus { color: var(--accent); }
.footer-contact:active { opacity: 0.8; }

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(20px);
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 0.9rem;
  background: var(--surface);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 1000;
  max-width: 88%;
  color: var(--text);
}

.toast.show { transform: translate(-50%, -50%) translateY(0); opacity: 1; }

.toast.success { border-left: 4px solid var(--success); }

.toast.error { border-left: 4px solid var(--danger); }

/* 底部导航 */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.bottom-nav a.active { color: var(--accent); font-weight: 600; }

.bottom-nav a:hover, .bottom-nav a:focus { color: var(--accent); }

/* 我的参与列表 */
.my-list { display: flex; flex-direction: column; gap: 14px; }

.my-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.my-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.my-card .my-time { font-size: 0.85rem; color: var(--text-muted); }
.my-card .my-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius: 20px;
}

.my-status-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.my-status-tag.pending { background: #fef3c7; color: #b45309; }
.my-status-tag.approved { background: #d1fae5; color: #047857; }
.my-status-tag.rejected { background: #fee2e2; color: #b91c1c; }

.my-card .my-reject {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--danger);
  word-break: break-word;
  border-left: 3px solid var(--danger);
}

.my-code-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.my-code-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.my-card .my-code-value {
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  word-break: break-all;
  margin-bottom: 10px;
}
.my-code-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.my-card .btn-copy-code {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
.my-card .btn-copy-code:active { opacity: 0.8; }

.my-card .btn-claim-vip {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
.my-card .btn-claim-vip:active { opacity: 0.9; }

.my-empty {
  text-align: center;
  padding: 48px 24px;
}
.my-empty-text {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 8px;
}
.my-empty-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.my-empty-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
.my-empty-btn:active { opacity: 0.9; }
