/* ===== 柯南主题装饰 ===== */

/* 案卷风格的任务/奖励卡片：左侧一条红色"证据条" + 右上角小小的印章感 */
.case-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--red);
  border-radius: var(--radius-md);
  padding: 14px 14px 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
}
.case-card .cc-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--card-alt);
  border: 2px dashed var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.case-card .cc-body { flex: 1; min-width: 0; }
.case-card .cc-title { font-weight: 800; font-size: 15px; color: var(--navy); }
.case-card .cc-points { font-size: 12.5px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.case-card.cc-disabled { opacity: 0.5; }

/* approvals 投票进度条：像证据收集进度 */
.vote-track {
  display: flex; align-items: center; gap: 4px; margin-top: 6px;
}
.vote-track .vd {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.vote-track .vd.on { background: var(--gold); }
.vote-track .vt-label { font-size: 11.5px; color: var(--muted); margin-left: 4px; }

/* 登录/设置页头部：放大镜徽章 */
.magnifier-badge {
  width: 64px; height: 64px; margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: var(--shadow-pop);
  border: 3px solid var(--gold);
}

/* 破案感提示条 */
.clue-banner {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.clue-banner .cb-icon { font-size: 22px; }
.clue-banner .cb-title { font-weight: 800; font-size: 14px; }
.clue-banner .cb-text { font-size: 12.5px; opacity: 0.92; margin-top: 2px; }

/* ===== 幸运抽奖机 ===== */
.lottery-machine {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: #fff;
  box-shadow: var(--shadow-pop);
}
/* 背景上一层细小的金色圆点，营造"案发现场证据板"的闪烁感，纯 CSS 不用图片 */
.lottery-machine::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(244,185,66,0.35) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.35;
  pointer-events: none;
}
.lottery-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lottery-title { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.lottery-cost-badge {
  background: var(--gold); color: var(--navy); font-weight: 800;
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; white-space: nowrap;
}
.lottery-reel {
  position: relative; z-index: 1;
  margin: 14px 0 10px;
  min-height: 100px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 20px rgba(244,185,66,0.25);
}
.lottery-reel-icon { font-size: 54px; line-height: 1; display: inline-block; }

/* 盲盒待开启态：轻轻悬浮 + 金光脉冲呼吸 + 右上角一个跳动的红色问号，暗示"点我" */
.lottery-reel.lottery-box-idle { cursor: pointer; animation: lotteryBoxGlow 1.6s ease-in-out infinite; }
.lottery-box-idle .lottery-reel-icon { animation: lotteryBoxBob 1.6s ease-in-out infinite; }
.lottery-box-idle::after {
  content: '❓';
  position: absolute; top: 8px; right: 12px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; font-size: 13px;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 8px rgba(215,38,61,0.7);
  animation: lotteryBadgePulse 1.2s ease-in-out infinite;
}
@keyframes lotteryBoxGlow {
  0%, 100% { box-shadow: inset 0 0 20px rgba(244,185,66,0.25); }
  50% { box-shadow: inset 0 0 20px rgba(244,185,66,0.25), 0 0 22px rgba(244,185,66,0.55); }
}
@keyframes lotteryBoxBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes lotteryBadgePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* 点开之后：先摇一摇制造悬念，金光一闪炸开，最后盲盒"啪"地弹成真正抽到的奖品 */
.lottery-reel-icon.box-shake { animation: lotteryBoxShake 90ms linear infinite; }
@keyframes lotteryBoxShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-5px) rotate(-7deg); }
  75% { transform: translateX(5px) rotate(7deg); }
}
.lottery-reel.box-flash::before {
  content: '';
  position: absolute; inset: 0; z-index: 3; border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(244,185,66,0.7) 35%, rgba(244,185,66,0) 70%);
  animation: lotteryFlashBurst 380ms ease-out forwards;
  pointer-events: none;
}
@keyframes lotteryFlashBurst {
  0% { opacity: 0; transform: scale(0.2); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(2.4); }
}
.lottery-machine.machine-flash { animation: lotteryMachineFlash 380ms ease-out; }
@keyframes lotteryMachineFlash {
  0% { box-shadow: var(--shadow-pop); }
  30% { box-shadow: var(--shadow-pop), 0 0 40px rgba(244,185,66,0.9); }
  100% { box-shadow: var(--shadow-pop); }
}
.lottery-reel-icon.box-pop { animation: lotteryBoxPop 0.6s cubic-bezier(.34,1.56,.64,1); }
@keyframes lotteryBoxPop {
  0% { transform: scale(0.2) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.lottery-result-name { position: relative; z-index: 1; text-align: center; font-weight: 800; font-size: 15px; min-height: 20px; }
.lottery-sub { position: relative; z-index: 1; text-align: center; font-size: 12px; opacity: 0.8; margin-top: 2px; }
.lottery-pool { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lottery-chip {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(244,185,66,0.5);
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px; display: flex; align-items: center; gap: 4px;
}
.lottery-not-ready {
  position: relative; z-index: 1; background: rgba(215,38,61,0.28); border: 1px solid var(--red);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; margin-top: 10px;
}

/* 揭晓弹层里的撒花粒子：一圈小 emoji 从正中心往外飞散、变小变透明 */
.lottery-burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.lottery-burst span {
  position: absolute; left: 50%; top: 50%; font-size: 20px;
  animation: lotteryBurst 900ms ease-out forwards;
}
@keyframes lotteryBurst {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.4) rotate(var(--r)); opacity: 0; }
}

/* ===== setup.php 独立页面 ===== */
.setup-page { }
.setup-header { text-align: center; padding: calc(32px + var(--safe-top)) 20px 10px; }
.setup-header h1 { color: var(--navy); margin: 0 0 4px; font-size: 22px; }
.setup-header .subtitle { color: var(--muted); font-size: 13px; margin: 0; }
.setup-main { padding: 8px 18px calc(40px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }

.notice-card { text-align: center; }
.notice-success { border-left: 5px solid var(--success); }
.notice-error { border-left: 5px solid var(--danger); text-align: left; }
.notice-error ul { padding-left: 18px; list-style: disc; color: var(--danger); font-size: 13.5px; }

.setup-form .form-section { margin-bottom: 18px; }
.setup-form h2 { font-size: 15px; color: var(--navy); margin: 0 0 10px; }
.setup-form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.setup-form input {
  display: block; width: 100%; margin-top: 6px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 15px; background: var(--bg); color: var(--ink);
  font-family: inherit;
}
.parent-row { display: grid; grid-template-columns: 1.4fr 0.8fr 1.2fr; gap: 8px; margin-bottom: 8px; }
.parent-row input {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 8px; font-size: 13.5px; background: var(--bg); color: var(--ink);
  font-family: inherit; width: 100%;
}
.avatar-input { text-align: center; }
