/* 汇友之家每日签到 - 样式 */
/* 品牌色：深海蓝 #1B3A5F / 鎏金 #C9A84C */

/* ===== 浮动签到按钮 ===== */
/* 位置与全站悬浮按钮组统一：中心线对齐客服按钮（距右53px），垂直等距16px堆叠 */
.hy_ck_float { position: fixed; right: 27px; bottom: 158px; z-index: 998; cursor: pointer; transition: all .3s cubic-bezier(.4,0,.2,1); }
.hy_ck_float_btn { width: 52px; height: 52px; border-radius: var(--hv-radius-full); background: linear-gradient(135deg, #C9A84C, #DBC56E); box-shadow: 0 4px 15px rgba(201,168,76,.4); display: flex; align-items: center; justify-content: center; font-size: 22px; color: #1B3A5F; position: relative; }
.hy_ck_float_btn::before { content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; border-radius: var(--hv-radius-full); border: 2px solid rgba(201,168,76,.3); animation: hy_ck_pulse 2s infinite; }
.hy_ck_float:hover { transform: translateY(-3px); }
.hy_ck_float:hover .hy_ck_float_btn { box-shadow: 0 6px 22px rgba(201,168,76,.55); }
.hy_ck_float_badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: var(--hv-radius-full); background: #ef4444; color: #fff; font-size: 10px; line-height: 18px; text-align: center; padding: 0 4px; font-weight: 700; box-shadow: 0 2px 6px rgba(239,68,68,.4); }
@keyframes hy_ck_pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.3); opacity: 0; } }
.hy_ck_float_done .hy_ck_float_btn { background: linear-gradient(135deg, #4caf50, #66bb6a); box-shadow: 0 4px 15px rgba(76,175,80,.3); }
.hy_ck_float_done .hy_ck_float_btn::before { display: none; }

/* ===== 签到弹窗 ===== */
.hy_ck_mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 9999; display: none; opacity: 0; transition: opacity .25s; }
.hy_ck_mask.show { display: block; opacity: 1; }

.hy_ck_modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.9); width: 400px; max-width: 92vw; max-height: 85vh; overflow-y: auto; background: #fff; border-radius: var(--hv-radius-lg); z-index: 10000; box-shadow: 0 20px 60px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.4,0,.2,1); }
.hy_ck_modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }

/* 弹窗头部 */
.hy_ck_header { position: relative; height: 140px; border-radius: var(--hv-radius-lg) var(--hv-radius-lg) 0 0; overflow: hidden; background: linear-gradient(135deg, #1B3A5F 0%, #2A5283 100%); display: flex; align-items: center; justify-content: center; }
.hy_ck_header_bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url('static/huiyou/huiyou_checkin.png'); background-size: cover; background-position: center; opacity: .25; }
.hy_ck_header_info { position: relative; text-align: center; color: #fff; z-index: 1; }
.hy_ck_header_title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.hy_ck_header_sub { font-size: 12px; color: rgba(255,255,255,.7); }

/* 连续天数大圆 */
.hy_ck_streak { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); width: 60px; height: 60px; border-radius: var(--hv-radius-full); background: linear-gradient(135deg, #C9A84C, #DBC56E); box-shadow: 0 4px 15px rgba(201,168,76,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1B3A5F; font-weight: 700; z-index: 2; }
.hy_ck_streak_num { font-size: 22px; line-height: 1; }
.hy_ck_streak_label { font-size: 9px; line-height: 1; margin-top: 2px; }

/* 关闭按钮 */
.hy_ck_close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: var(--hv-radius-full); background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: 14px; z-index: 3; transition: background .2s; }
.hy_ck_close:hover { background: rgba(255,255,255,.3); }

/* 弹窗内容 */
.hy_ck_body { padding: 40px 24px 24px; }

/* 7天签到日历 */
.hy_ck_week { display: flex; gap: 6px; margin-bottom: 20px; }
.hy_ck_day { flex: 1; text-align: center; }
.hy_ck_day_circle { width: 38px; height: 38px; border-radius: var(--hv-radius-full); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; border: 2px solid #e8ecf2; background: #f8faff; color: #999; transition: all .25s; position: relative; }
.hy_ck_day_done .hy_ck_day_circle { background: linear-gradient(135deg, #C9A84C, #DBC56E); border-color: #C9A84C; color: #fff; box-shadow: 0 2px 8px rgba(201,168,76,.3); }
.hy_ck_day_today .hy_ck_day_circle { border-color: #1B3A5F; border-width: 2px; box-shadow: 0 0 0 3px rgba(27,58,95,.1); }
.hy_ck_day_today.hy_ck_day_done .hy_ck_day_circle { background: linear-gradient(135deg, #1B3A5F, #2A5283); border-color: #1B3A5F; }
.hy_ck_day_label { font-size: 10px; color: #999; }
.hy_ck_day_coins { font-size: 9px; color: #C9A84C; font-weight: 600; margin-top: 2px; }
.hy_ck_day_done .hy_ck_day_coins { color: #C9A84C; }

/* 奖励预览 */
.hy_ck_reward_box { background: linear-gradient(135deg, #f8faff, #fff); border: 1px solid #e8ecf2; border-radius: var(--hv-radius-md); padding: 16px; margin-bottom: 16px; text-align: center; }
.hy_ck_reward_title { font-size: 12px; color: #999; margin-bottom: 8px; }
.hy_ck_reward_coins { font-size: 28px; font-weight: 800; color: #C9A84C; }
.hy_ck_reward_coins small { font-size: 12px; font-weight: 400; }
.hy_ck_reward_growth { font-size: 12px; color: #999; margin-top: 4px; }
.hy_ck_reward_growth span { color: #4caf50; font-weight: 600; }
.hy_ck_reward_streak { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: var(--hv-radius-sm-plus); background: rgba(201,168,76,.12); color: #C9A84C; font-size: 11px; font-weight: 600; }

/* 签到按钮 */
.hy_ck_btn { width: 100%; padding: 14px; border-radius: var(--hv-radius-md); border: none; font-size: 16px; font-weight: 700; cursor: pointer; transition: all .25s cubic-bezier(.4,0,.2,1); position: relative; overflow: hidden; }
.hy_ck_btn::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent); transition: left .5s; }
.hy_ck_btn:hover::after { left: 100%; }
.hy_ck_btn_go { background: linear-gradient(135deg, #C9A84C, #DBC56E); color: #1B3A5F; box-shadow: 0 4px 14px rgba(201,168,76,.35); }
.hy_ck_btn_go:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,.5); }
.hy_ck_btn_done { background: #f0f2f5; color: #999; cursor: default; }
.hy_ck_btn_done::after { display: none; }

/* 签到成功动画 */
.hy_ck_success_pop { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0); z-index: 10001; text-align: center; pointer-events: none; transition: all .4s cubic-bezier(.34,1.56,.64,1); }
.hy_ck_success_pop.show { transform: translate(-50%,-50%) scale(1); }
.hy_ck_success_icon { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: var(--hv-radius-full); background: linear-gradient(135deg, #C9A84C, #DBC56E); display: flex; align-items: center; justify-content: center; font-size: 36px; color: #fff; box-shadow: 0 8px 30px rgba(201,168,76,.4); }
.hy_ck_success_text { font-size: 18px; font-weight: 700; color: #1B3A5F; }
.hy_ck_success_coins { font-size: 14px; color: #C9A84C; margin-top: 4px; }

/* Tab 切换 */
.hy_ck_tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #e8ecf2; }
.hy_ck_tab { flex: 1; padding: 10px; text-align: center; font-size: 13px; color: #999; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.hy_ck_tab.active { color: #1B3A5F; border-bottom-color: #C9A84C; font-weight: 600; }

/* 排行榜 */
.hy_ck_rank { }
.hy_ck_rank_item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.hy_ck_rank_item:last-child { border-bottom: none; }
.hy_ck_rank_num { width: 24px; height: 24px; border-radius: var(--hv-radius-full); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; background: #f0f2f5; color: #999; }
.hy_ck_rank_num.top1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }
.hy_ck_rank_num.top2 { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); color: #fff; }
.hy_ck_rank_num.top3 { background: linear-gradient(135deg, #CD7F32, #B87333); color: #fff; }
.hy_ck_rank_name { flex: 1; font-size: 13px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hy_ck_rank_name small { color: #999; font-size: 11px; margin-left: 4px; }
.hy_ck_rank_days { font-size: 12px; color: #C9A84C; font-weight: 600; }
.hy_ck_rank_coins { font-size: 11px; color: #999; }

/* 余额显示 */
.hy_ck_balance { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; margin-bottom: 16px; border-top: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; }
.hy_ck_balance_item { text-align: center; min-width: 56px; }
.hy_ck_balance_val { font-size: 18px; font-weight: 700; color: #1B3A5F; }
.hy_ck_balance_val.gold { color: #C9A84C; }
.hy_ck_balance_label { font-size: 10px; color: #999; margin-top: 2px; }

/* 里程碑奖励 */
.hy_ck_milestone { margin-bottom: 16px; }
.hy_ck_milestone_title { font-size: 12px; color: #999; margin-bottom: 8px; }
.hy_ck_milestone_bar { display: flex; gap: 6px; justify-content: space-between; }
.hy_ck_ms { flex: 1; text-align: center; }
.hy_ck_ms_day { display: inline-block; padding: 4px 8px; border-radius: var(--hv-radius-sm-plus); font-size: 11px; font-weight: 600; background: #f0f2f5; color: #999; }
.hy_ck_ms.reached .hy_ck_ms_day { background: linear-gradient(135deg, #C9A84C, #DBC56E); color: #fff; }
.hy_ck_ms.next .hy_ck_ms_day { background: rgba(27,58,95,.1); color: #1B3A5F; box-shadow: 0 0 0 2px rgba(27,58,95,.15); }
.hy_ck_milestone_next { font-size: 11px; color: #999; text-align: center; margin-top: 6px; }
.hy_ck_reward_milestone { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: var(--hv-radius-sm-plus); background: rgba(27,58,95,.1); color: #1B3A5F; font-size: 11px; font-weight: 600; }

/* 补签按钮 */
.hy_ck_btn_makeup { margin-top: 8px; background: linear-gradient(135deg, #1B3A5F, #2A5283); color: #fff; box-shadow: 0 4px 14px rgba(27,58,95,.3); }
.hy_ck_btn_makeup:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(27,58,95,.4); }

/* 月历 */
.hy_ck_cal_nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hy_ck_cal_prev, .hy_ck_cal_next { cursor: pointer; font-size: 18px; color: #1B3A5F; padding: 4px 12px; border-radius: var(--hv-radius-sm); transition: background .2s; user-select: none; }
.hy_ck_cal_prev:hover, .hy_ck_cal_next:hover { background: rgba(27,58,95,.08); }
.hy_ck_cal_month { font-size: 14px; font-weight: 700; color: #1B3A5F; }
.hy_ck_cal_stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.hy_ck_cal_stats span { font-size: 11px; color: #999; }
.hy_ck_cal_stats b { color: #1B3A5F; }
.hy_ck_cal_grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.hy_ck_cal_wd { text-align: center; font-size: 11px; color: #999; padding: 4px 0; font-weight: 600; }
.hy_ck_cal_cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--hv-radius-sm); background: #f8faff; transition: all .2s; position: relative; }
.hy_ck_cal_empty { background: transparent; }
.hy_ck_cal_day { font-size: 12px; color: #666; }
.hy_ck_cal_done { background: rgba(201,168,76,.12); }
.hy_ck_cal_done .hy_ck_cal_day { color: #C9A84C; font-weight: 600; }
.hy_ck_cal_mark { font-size: 10px; color: #C9A84C; }
.hy_ck_cal_today { box-shadow: 0 0 0 2px #1B3A5F; }
.hy_ck_cal_makeup { background: rgba(255,152,0,.1); }
.hy_ck_cal_makeup .hy_ck_cal_day { color: #ff9800; }
.hy_ck_cal_makeup .hy_ck_cal_mark { color: #ff9800; }

/* 等级进度（成长值） */
.hy_ck_level { margin-top: 14px; padding: 10px 12px; background: #f8f9fb; border-radius: 8px; }
.hy_ck_level_head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hy_ck_level_title { font-size: 13px; font-weight: 600; color: #1B3A5F; }
.hy_ck_level_next { font-size: 11px; color: #999; }
.hy_ck_level_bar { height: 6px; background: #e8eaed; border-radius: 3px; overflow: hidden; }
.hy_ck_level_bar i { display: block; height: 100%; background: linear-gradient(90deg, #1B3A5F, #C9A84C); border-radius: 3px; transition: width .4s ease; }
.hy_ck_balance_item { cursor: help; }

/* 修复 showWindow 浮层关闭按钮不可见（被布局压缩为0×0）：强制可见可点 */
.flb .flbc { display: block !important; flex: none; width: 22px !important; height: 22px !important; margin: 2px 4px 0 0; background: #eef1f5; border-radius: 50%; overflow: hidden; cursor: pointer; font-size: 0; line-height: 22px; text-align: center; text-decoration: none; }
.flb .flbc:before { content: "\00d7"; font-size: 16px; color: #666; font-weight: 700; }
.flb .flbc:hover { background: #1B3A5F; }
.flb .flbc:hover:before { color: #fff; }

/* 响应式 */
@media (max-width: 768px) {
  .hy_ck_modal { width: 95vw; }
  .hy_ck_day_circle { width: 32px; height: 32px; font-size: 11px; }
  .hy_ck_float { right: 17px; bottom: 120px; }
  .hy_ck_balance { gap: 8px; }
  .hy_ck_balance_val { font-size: 16px; }
  .hy_ck_cal_cell { border-radius: var(--hv-radius-xs-plus); }
  .hy_ck_cal_day { font-size: 10px; }
  .hy_ck_cal_stats { gap: 6px; }
  .hy_ck_cal_stats span { font-size: 10px; }
  .hy_ck_milestone_bar { gap: 4px; }
  .hy_ck_ms_day { padding: 3px 6px; font-size: 10px; }
}
@media (max-width: 480px) {
  /* 签到悬浮钮缩小避让通栏卡片内容 */
  .hy_ck_float { right: 12px; bottom: 124px; transform: scale(.85); transform-origin: bottom right; }
}
