/* ===== 乐造AI · 深色简约风 ===== */
/* ===== 全局设计变量（改风格只改这一处）===== */
:root {
  --bg-base: #0f1020;
  --bg-shell: linear-gradient(180deg, #0f1020 0%, #161a35 100%);
  --topbar-bg: rgba(15,16,32,0.92);

  --c-primary: #7b5cff;
  --c-secondary: #4ca4ff;
  --grad-main: linear-gradient(135deg, #7b5cff, #4ca4ff);
  --grad-hero: linear-gradient(90deg, #a58cff, #4fc3ff);

  --text-main: #fff;
  --text-sub: #c8ccec;
  --text-muted: #9aa0c8;
  --text-dim: #6a6f96;

  --border-soft: rgba(255,255,255,0.1);
  --chip-bg: rgba(255,255,255,0.07);
  --card-bg: rgba(255,255,255,0.06);

  --radius-card: 16px;
  --radius-btn: 999px;
  --radius-input: 12px;
  --radius-chip: 24px;

  --gap: 16px;
  --pad-card: 16px;

  --dur: 0.25s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-base);
  color: #eceafd;
  overflow-x: hidden;
}

/* ===== 应用容器 ===== */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #0f1020 0%, #161a35 100%);
}

/* ===== 页面切换 ===== */
.page { display: none; min-height: 100vh; padding-bottom: 76px; }
.page.active { display: block; }
.page.hidden { display: none; }
.overlay.hidden { display: none; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px; position: sticky; top: 0; z-index: 10;
  background: rgba(15,16,32,0.92); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #7b5cff, #3fa9ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: 700;
}
.brand-title { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.quota-box {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06); border-radius: 20px; padding: 8px 14px;
}
.quota-item { display: flex; align-items: baseline; gap: 4px; }
.quota-item span:first-child { font-size: 18px; font-weight: 700; color: #fff; }
.q-label { font-size: 12px; color: #9aa0c8; }
.quota-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); }

/* ===== 主内容 ===== */
.content { padding: 8px 20px; }

/* 分享按钮（首页） */
.share-btn {
  width: 100%; margin-bottom: 14px; padding: 12px; border-radius: 22px;
  border: 1px solid rgba(123,92,255,0.4); background: rgba(123,92,255,0.12);
  color: #c8ccec; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.25s;
}
.share-btn:active { transform: scale(0.98); }
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 签到卡片（个人中心） */
.sign-card {
  margin: 16px 0; padding: 16px; border-radius: 16px;
  background: rgba(123,92,255,0.08); border: 1px solid rgba(123,92,255,0.18);
}
.sign-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sign-btn {
  padding: 10px 22px; border-radius: 22px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff); color: #fff;
  font-size: 14px; font-weight: 700;
}
.sign-btn.disabled { opacity: 0.6; cursor: not-allowed; background: rgba(255,255,255,0.12); color: #9aa0c8; }
.sign-status { font-size: 13px; color: #9aa0c8; }
.times-box { display: flex; gap: 12px; margin-top: 14px; }
.time-item {
  flex: 1; text-align: center; padding: 12px 0; border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.time-num { font-size: 22px; font-weight: 800; color: #fff; display: block; }
.time-label { font-size: 11px; color: #9aa0c8; margin-top: 4px; }
.sign-hint { margin-top: 12px; font-size: 11px; color: #6a6f96; line-height: 1.6; }
.hero { text-align: center; margin: 16px 0 22px; }
.hero-title {
  font-size: 30px; font-weight: 800;
  background: linear-gradient(90deg, #a58cff, #4fc3ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 14px; color: #9aa0c8; margin-top: 8px; }

/* 模式切换栏 */
.mode-switch {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.mode-tab {
  flex: 1; padding: 10px 0; border-radius: 24px; font-size: 15px;
  background: rgba(255,255,255,0.07); color: #c8ccec;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: all 0.25s;
}
.mode-tab.active {
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  color: #fff; font-weight: 700; border-color: transparent;
}

/* 输入框 */
.input-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 6px 14px; position: relative;
}
.topic-input {
  width: 100%; background: transparent; border: none; outline: none;
  color: #fff; font-size: 16px; resize: none; line-height: 1.6; padding: 12px 0;
}
.topic-input::placeholder { color: #6a6f96; }
.char-count {
  position: absolute; right: 14px; bottom: 8px; font-size: 11px; color: #6a6f96;
}

/* 自定义歌词填写说明 */
.lyrics-hint {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(123,92,255,0.08); border: 1px solid rgba(123,92,255,0.18);
}
.lyrics-hint-title {
  font-size: 13px; font-weight: 700; color: #a58cff; margin-bottom: 6px;
}
.lyrics-hint-item {
  font-size: 12px; color: #9aa0c8; line-height: 1.7;
}

/* 选项组 */
.option-group { margin: 20px 0 6px; }
.option-label { font-size: 14px; color: #b6bad9; margin-bottom: 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 20px; border-radius: 24px; font-size: 15px;
  background: rgba(255,255,255,0.07); color: #c8ccec; border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: all 0.25s;
}
.chip.active {
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  color: #fff; font-weight: 700; border-color: transparent;
}

/* 错误提示 */
.error-tip {
  margin-top: 14px; padding: 0 4px; font-size: 14px; color: #ff7a8a; min-height: 20px;
}

/* 生成按钮 */
.gen-btn {
  width: 100%; margin-top: 16px; padding: 16px; border: none; border-radius: 28px;
  font-size: 18px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  box-shadow: 0 8px 24px rgba(123,92,255,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.gen-btn:active { transform: scale(0.97); }
.gen-btn:disabled { opacity: 0.5; box-shadow: none; cursor: not-allowed; transform: none; }
.gen-btn.loading::after {
  content: "…"; animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; background: #14152e;
  border-top: 1px solid rgba(255,255,255,0.08); padding: 8px 0 20px; z-index: 20;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: #8a90bb; font-size: 11px; cursor: pointer;
}
.nav-item.active { color: #fff; }
.nav-icon { font-size: 22px; line-height: 1; }

/* ===== 生成进度弹窗（无全屏遮罩，页面透出，不再整体变蓝） ===== */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.progress-panel {
  text-align: center; padding: 30px 26px;
  background: rgba(20,22,44,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  max-width: 300px; width: 82%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
  pointer-events: auto;
}
.progress-visual { margin-bottom: 24px; }
.pulse-circle {
  width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  display: flex; align-items: center; justify-content: center;
  animation: pulse 1.2s ease-in-out infinite;
}
.pulse-dot {
  width: 54px; height: 54px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #7b5cff;
}
.pulse-dot::after { content: "♪"; }
@keyframes pulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); } }
.progress-text { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.progress-percent {
  font-size: 34px; font-weight: 800; color: #a58cff;
  margin-bottom: 12px; font-variant-numeric: tabular-nums;
}
/* 生成进度弹窗专用的进度条（独立类名，避免与播放器进度条 .progress-fill 冲突） */
.gen-progress-bar {
  position: relative;
  width: 220px; height: 6px; border-radius: 8px; margin: 0 auto;
  background: rgba(255,255,255,0.1); overflow: hidden;
}
.gen-progress-fill {
  position: relative;
  height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, #7b5cff, #4ca4ff); transition: width 0.5s;
  border: none;
}
/* 保留旧选择器兼容（播放器用 .progress-fill） */
.progress-fill {
  position: relative;
  height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, #7b5cff, #4ca4ff); transition: width 0.5s;
}
.progress-cancel {
  margin-top: 28px; padding: 12px 30px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: #c8ccec; font-size: 15px; cursor: pointer;
}

/* ===== 播放结果页 ===== */
.result-topbar { justify-content: flex-start; gap: 16px; }
.back-btn {
  background: transparent; border: none; color: #c8ccec; font-size: 22px; cursor: pointer; padding: 0 4px;
}
.result-title { font-size: 17px; font-weight: 700; }
.result-content { text-align: center; padding-top: 20px; }
.vinyl {
  width: 230px; height: 230px; margin: 20px auto; border-radius: 50%;
  background: repeating-radial-gradient(circle, #1a1a2e 0 6px, #222238 6px 12px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: none;
}
.vinyl.spinning { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vinyl-label {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff;
}
.result-name { font-size: 24px; font-weight: 800; color: #fff; margin-top: 8px; }
.result-style {
  display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 16px;
  background: rgba(123,92,255,0.2); color: #b7a5ff; font-size: 13px;
}
.lyrics-scroll {
  max-height: 40vh; overflow-y: auto; margin: 20px auto; padding: 0 4px; text-align: left;
}
.lyrics-text {
  font-family: inherit; font-size: 15px; line-height: 2; color: #d0d4f2; white-space: pre-wrap; word-wrap: break-word;
}
/* 播放进度条 */
.player-progress {
  width: 100%; max-width: 320px; margin: 6px auto 4px;
  padding: 6px 4px;
}
.progress-track {
  position: relative; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.12); cursor: pointer;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, #7b5cff, #4ca4ff); border-radius: 4px;
}
.progress-thumb {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.progress-time {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-size: 11px; color: #9aa0c8;
}

.bottom-bar {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0 16px;
}
.ctrl-btn {
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff); color: #fff;
  font-size: 24px; display: flex; align-items: center; justify-content: center;
}
.ctrl-btn.small {
  width: auto; height: 44px; border-radius: 22px; padding: 0 20px; font-size: 14px;
  background: rgba(255,255,255,0.1); color: #d0d4f2;
}
.disclaimer { font-size: 11px; color: #6a6f96; }

/* ===== 我的作品页 ===== */
.works-content { padding-top: 10px; }
.works-list { display: flex; flex-direction: column; gap: 14px; }
.works-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 16px; cursor: pointer;
}
.works-card-top { display: flex; align-items: center; justify-content: space-between; }
.works-topic { font-size: 16px; font-weight: 700; color: #fff; }
.works-status {
  font-size: 12px; padding: 4px 10px; border-radius: 12px; font-weight: 600;
}
.works-status.done { background: rgba(80,200,140,0.2); color: #7ce0a8; }
.works-status.pending, .works-status.writing, .works-status.composing, .works-status.singing { background: rgba(123,92,255,0.2); color: #b7a5ff; }
.works-status.failed { background: rgba(255,122,138,0.2); color: #ff8a9a; }
.works-meta { margin-top: 8px; font-size: 12px; color: #6a6f96; }
.works-error { margin-top: 6px; font-size: 12px; color: #ff8a9a; }

/* ===== 我的页 ===== */
.mine-content { padding-top: 10px; }
.user-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  background: rgba(255,255,255,0.05); border-radius: 16px; margin-bottom: 16px;
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff);
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
}
.user-name { font-size: 18px; font-weight: 700; color: #fff; }
.user-type { font-size: 13px; color: #9aa0c8; margin-top: 4px; }
.stat-grid { display: flex; gap: 12px; margin-bottom: 16px; }
.stat-box {
  flex: 1; text-align: center; padding: 18px 0;
  background: rgba(255,255,255,0.05); border-radius: 14px;
}
.stat-num { font-size: 24px; font-weight: 800; color: #fff; }
.stat-label { font-size: 12px; color: #9aa0c8; margin-top: 6px; }
.redeem-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 18px;
}
.redeem-row { display: flex; gap: 10px; margin-top: 4px; }
.redeem-input {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 14px; color: #fff; font-size: 15px; outline: none;
}
.redeem-input::placeholder { color: #6a6f96; }
.redeem-btn {
  padding: 14px 22px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff); color: #fff; font-size: 15px; font-weight: 700;
}
.redeem-tip { margin-top: 12px; font-size: 13px; color: #7ce0a8; min-height: 18px; }
.footer-tip { text-align: center; color: #6a6f96; font-size: 12px; margin-top: 24px; }

/* ===== 联系方式引导（位置1：底部固定悬浮条）===== */
.contact-bar {
  position: fixed; bottom: 70px;      /* 避开底部导航，iPhone 安全区之上 */
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 448px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(135deg, #7b5cff, #4ca4ff); color: #fff;
  border-radius: 24px; z-index: 30;
  padding: 12px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(123,92,255,0.4);
  cursor: default; -webkit-user-select: none; user-select: none;
}
.contact-bar-text { opacity: 0.95; }
/* 微信 / QQ 按钮：可点击胶囊卡片，视觉上明确"这是按钮" */
.contact-pill {
  border: none; outline: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; border-radius: 18px;
  font-size: 13px; font-weight: 700; color: #fff;
  transition: transform .12s, opacity .12s;
  -webkit-tap-highlight-color: transparent;
}
.contact-pill:active { transform: scale(.96); }
/* 微信按钮：跟随主题色 */
.contact-wechat { background: rgba(255,255,255,0.22); }
/* QQ按钮：用QQ蓝区分，一眼看出是"点击跳转"而非复制 */
.contact-qq { background: rgba(18,150,255,0.35); }
.contact-bar:active { transform: translateX(-50%) scale(0.98); }

/* ===== 联系方式引导（位置2：次数不足提示）===== */
.quota-tip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: 12px; padding: 12px 16px;
  background: rgba(123,92,255,0.12); border: 1px solid rgba(123,92,255,0.35);
  border-radius: 14px; cursor: pointer;
  font-size: 14px; color: #c8ccec;
}
.quota-tip span:first-child { font-weight: 700; }
.quota-contact-row { display: flex; align-items: center; gap: 10px; }
.quota-div { color: #6a6f96; }
.quota-wechat, .quota-qq { color: #ffffff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===== 联系方式引导（位置3：兑换码页）===== */
.redeem-contact {
  margin-top: 14px; text-align: center; font-size: 13px; color: #9aa0c8;
  cursor: pointer; line-height: 1.7;
}
.redeem-contact-row { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; }
.redeem-div { color: #6a6f96; }
.redeem-wechat, .redeem-qq { font-weight: 700; color: #b7a5ff; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ===== 轻提示 toast ===== */
.toast {
  position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(10,11,22,0.92); color: #fff; font-size: 14px;
  padding: 12px 24px; border-radius: 24px; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
  border: 1px solid rgba(123,92,255,0.5); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== QQ 二维码弹窗 ===== */
.qq-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,11,22,0.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.qq-modal.hidden { display: none; }
.qq-modal-card {
  width: 100%; max-width: 320px;
  background: linear-gradient(180deg,#1a1035,#14152e);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 20px;
  padding: 24px 20px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.qq-modal-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.qq-modal-img {
  width: 200px; height: 200px; margin: 0 auto 14px; display: block;
  border-radius: 12px; background: #fff; padding: 6px; object-fit: contain;
}
.qq-modal-num-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.qq-modal-num-label { font-size: 14px; color: #9aa0c8; }
.qq-modal-num { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.qq-modal-copy {
  border: none; outline: none; cursor: pointer; padding: 4px 12px; border-radius: 12px;
  background: rgba(123,92,255,0.25); color: #c9bcff; font-size: 12px; font-weight: 700;
}
.qq-modal-hint { font-size: 13px; color: #9aa0c8; margin-bottom: 16px; line-height: 1.6; }
.qq-modal-close {
  width: 100%; border: none; outline: none; cursor: pointer; padding: 12px;
  border-radius: 18px; background: linear-gradient(135deg,#7b5cff,#4ca4ff);
  color: #fff; font-size: 15px; font-weight: 700;
}

/* ===== 登录页 ===== */
.login-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box {
  width: 100%; max-width: 360px; text-align: center;
  background: rgba(17,18,38,0.96); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 34px 26px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  background: linear-gradient(135deg,#7b5cff,#4ca4ff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700;
}
.login-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.login-sub { font-size: 13px; color: #9aa0c8; margin-bottom: 24px; line-height: 1.6; }
.login-field { margin-bottom: 14px; }
.login-input {
  width: 100%; padding: 14px 16px; border-radius: 14px; outline: none;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 16px;
}
.login-input::placeholder { color: #6a6f96; }
.login-code-row { display: flex; gap: 10px; }
.login-code-row .login-input { flex: 1; }
.login-send {
  padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(123,92,255,0.45);
  background: rgba(123,92,255,0.15); color: #c8ccec; font-size: 14px;
  white-space: nowrap; cursor: pointer;
}
.login-send:disabled { opacity: 0.5; cursor: not-allowed; }
.login-tip { min-height: 20px; font-size: 13px; color: #ff8a9a; margin: 8px 0 12px; }
.login-btn {
  width: 100%; padding: 14px; border-radius: 26px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#7b5cff,#4ca4ff); color: #fff;
  font-size: 16px; font-weight: 700; box-shadow: 0 8px 24px rgba(123,92,255,0.35);
}
.login-back { width: 100%; margin-top: 12px; padding: 12px; border: none; background: transparent; color: #9aa0c8; font-size: 14px; cursor: pointer; }

/* ===== 退出登录 ===== */
.logout-btn {
  width: 100%; margin-top: 18px; padding: 13px; border-radius: 24px;
  border: 1px solid rgba(255,138,154,0.4); background: transparent;
  color: #ff8a9a; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ===== 手机号显示 ===== */
.user-phone { font-size: 13px; color: #6a6f96; margin-top: 4px; }

/* ===== 进度弹窗新增：预计时间 / 提示 / 按钮 ===== */
.progress-eta { font-size: 13px; color: #9aa0c8; margin-top: 12px; }
.progress-hint { font-size: 12px; color: #7a86b5; margin-top: 4px; }
.progress-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.btn-bg {
  padding: 12px 26px; border-radius: 24px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#7b5cff,#4ca4ff); color: #fff;
  font-size: 15px; font-weight: 700;
}
.btn-cancel {
  padding: 12px 20px; border-radius: 24px; border: 1px solid rgba(255,138,154,0.4);
  background: transparent; color: #ff8a9a; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ===== 全局后台生成状态条 ===== */
.gen-status-bar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 9999; margin-top: 8px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(20,22,44,0.95); border: 1px solid rgba(123,92,255,0.5);
  border-radius: 22px; padding: 8px 18px; box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  cursor: pointer; user-select: none;
}
.gen-status-text { font-size: 13px; color: #c8ccec; font-weight: 600; white-space: nowrap; }
.gen-status-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #7b5cff;
  animation: gen-rotate 0.8s linear infinite;
}
@keyframes gen-rotate { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

/* ===== 任务列表面板 ===== */
.gen-task-panel {
  position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  z-index: 9998; width: 90%; max-width: 340px;
  background: rgba(20,22,44,0.97); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}
.gen-task-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 15px; font-weight: 700;
}
.gen-task-close { background: none; border: none; color: #9aa0c8; font-size: 18px; cursor: pointer; }
.gen-task-list { max-height: 320px; overflow-y: auto; }
.gen-task-item {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.gen-task-item:last-child { border-bottom: none; }
.gen-task-item-left { flex: 1; min-width: 0; }
.gen-task-item-title {
  font-size: 14px; color: #fff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gen-task-item-meta { font-size: 12px; color: #8a90bb; margin-top: 4px; }
.gen-task-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.gen-task-btn {
  padding: 5px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: #c8ccec; font-size: 12px; cursor: pointer;
}
.gen-task-btn.danger { border-color: rgba(255,138,154,0.4); color: #ff8a9a; }
.gen-task-empty { text-align: center; color: #6a6f96; padding: 24px; font-size: 13px; }

/* ===== 完成提醒横幅 ===== */
.gen-done-banner {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%) translateY(-80px);
  z-index: 9999; width: 90%; max-width: 380px;
  background: linear-gradient(135deg,#2e7d4f,#22b573); color: #fff;
  border-radius: 14px; padding: 14px 18px; box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  cursor: pointer; transition: transform 0.4s ease; text-align: center;
  font-size: 14px; font-weight: 600; line-height: 1.5;
}
.gen-done-banner.show { transform: translateX(-50%) translateY(0); }

/* ===== 取消二次确认 ===== */
/* 保证所有带 .hidden 的组件真正隐藏（避免被 display:flex 覆盖） */
.cancel-confirm.hidden,
.gen-status-bar.hidden,
.gen-task-panel.hidden,
.gen-done-banner.hidden,
.gen-task-panel.hidden { display: none !important; }

.cancel-confirm {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10,11,22,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.cancel-confirm-card {
  width: 300px; text-align: center;
  background: rgba(20,22,44,0.97); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; padding: 26px 24px;
}
.cancel-confirm-title { font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cancel-confirm-sub { font-size: 13px; color: #ff8a9a; margin-bottom: 20px; }
.cancel-confirm-actions { display: flex; gap: 12px; justify-content: center; }
.cancel-keep {
  padding: 11px 22px; border-radius: 22px; border: 1px solid rgba(255,255,255,0.2);
  background: transparent; color: #c8ccec; font-size: 14px; cursor: pointer;
}
.cancel-yes {
  padding: 11px 22px; border-radius: 22px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#d8435a,#ff8a9a); color: #fff; font-size: 14px; font-weight: 700;
}

/* ===== 首页右上角：未登录"登录"入口 ===== */
.quota-login {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 18px;
  background: linear-gradient(135deg,#7b5cff,#4ca4ff);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ===== 试听/完整 徽章（结果页）===== */
.access-badge {
  display: inline-flex; align-items: center; align-self: center;
  margin: 6px auto 0; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 700; gap: 4px;
}
.access-badge.trial { background: rgba(255,180,60,.14); color: #ffb43c; border: 1px solid rgba(255,180,60,.4); }
.access-badge.full  { background: rgba(80,220,160,.14); color: #7ce0a8; border: 1px solid rgba(80,220,160,.4); }

/* ===== 结果页加锁提示 ===== */
.result-lock-tip {
  margin-top: 8px; padding: 9px 14px; border-radius: 10px;
  background: rgba(255,180,60,.10); border: 1px solid rgba(255,180,60,.28);
  color: #ffcf8a; font-size: 12.5px; line-height: 1.5; text-align: center;
}

/* ===== 作品卡片试听/完整标签 ===== */
.access-tag {
  display: inline-flex; align-items: center; margin-left: 6px;
  padding: 1px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 700;
  vertical-align: middle;
}
.access-tag.trial { background: rgba(255,180,60,.16); color: #ffb43c; }
.access-tag.full  { background: rgba(80,220,160,.16); color: #7ce0a8; }

/* ===== 首页生成按钮规则说明 ===== */
.gen-rule-tip {
  margin-top: 10px; text-align: center;
  color: #8a8fb8; font-size: 12px; line-height: 1.5;
}

/* ===== 首页生成价格提示 ===== */
.gen-price-tip {
  margin-top: 8px; text-align: center;
  color: #ffcf8a; font-size: 12.5px; line-height: 1.5;
  background: rgba(255,180,60,.08); border-radius: 8px; padding: 6px 10px;
}

/* ===== 我的页：赠送积分 + 有效期 ===== */
.quota-gift {
  margin-top: 8px; color: #7ce0a8; font-size: 12.5px; text-align: center;
}
.quota-expire {
  color: #8a8fb8; font-size: 11.5px; text-align: center; margin-top: 2px;
}

/* ===== 兑换码价格说明 ===== */
.redeem-price {
  margin-top: 6px; text-align: center;
  color: #ffcf8a; font-size: 12px; line-height: 1.5;
}

/* ===== 下载按钮禁用态 ===== */
.ctrl-btn.disabled, .ctrl-btn:disabled {
  opacity: .5; cursor: not-allowed; filter: grayscale(.4);
}

/* ===== 「我的」页面：获取更多生成次数（点击弹窗，联系方式收进弹窗）===== */
.more-times-btn {
  width: 100%; margin-top: 14px; padding: 12px; border-radius: var(--radius-btn);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--text-sub); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform var(--dur) var(--ease);
}
.more-times-btn:active { transform: scale(0.98); }

/* ===== 获取更多次数弹窗（联系方式统一收进这里）===== */
.times-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,11,22,0.8); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.times-modal.hidden { display: none !important; }
.times-modal-card {
  position: relative; width: 100%; max-width: 320px;
  background: rgba(20,22,44,0.97); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-card); padding: 24px 22px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.times-modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer; line-height: 1;
}
.times-modal-title { font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 6px; }
.times-modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.times-modal-body { display: flex; flex-direction: column; gap: 14px; }
.times-contact-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.06); border-radius: var(--radius-input);
  padding: 12px 14px;
}
.times-contact-name { font-size: 13px; color: var(--text-muted); }
.times-contact-value { flex: 1; text-align: right; font-size: 14px; font-weight: 700; color: var(--text-main); margin: 0 10px; }
.times-copy-btn {
  padding: 7px 16px; border-radius: 18px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#7b5cff,#4ca4ff); color: #fff;
  font-size: 13px; font-weight: 700;
}
.times-qq-btn {
  padding: 12px; border-radius: var(--radius-input); border: none; cursor: pointer;
  background: rgba(18,150,255,0.25); color: #fff; font-size: 14px; font-weight: 700;
}

/* ===== 「我的」页面：我的次数模块（整合，大数字剩余）===== */
.quota-card {
  margin: 16px 0; padding: 22px 16px; border-radius: var(--radius-card);
  background: linear-gradient(135deg, rgba(123,92,255,0.16), rgba(76,164,255,0.10));
  border: 1px solid rgba(123,92,255,0.25);
  text-align: center;
}
.quota-big { font-size: 44px; font-weight: 800; color: var(--text-main); line-height: 1; }
.quota-unit { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.quota-label { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.quota-sub { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ===== 网站底部：ICP备案信息 ===== */
.site-footer {
  padding: 18px 12px 28px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  opacity: 0.75;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
}
.site-footer a:hover { color: var(--text-main); opacity: 1; }
