/* kitty.css —— 主题扩展
   ① 默认主题 / 护眼主题：完全保持 20261123-14 原样（无凯蒂猫元素）
   ② 夜间模式主题 = Hello Kitty 主题（仅 [data-theme="dark"] 生效）
   ③ 首页功能入口（排行榜/错题本/教材视频/收藏夹）是功能，不是皮肤：三主题都用站点自己的配色
   删除 index.html 里的 <link> 即彻底回退。 */

/* ============================================================
   一、通用结构：功能入口栏（跟随当前主题变量，不引入凯蒂猫元素）
   ============================================================ */
.hero.kk-hero{
  padding:0 !important;
  margin:0 0 9px !important;
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  overflow:visible !important;
}
.kk-hero-acts{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}
.kk-act{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px;
  background:var(--bg2);
  border:1px solid var(--line);
  border-radius:14px;
  padding:5px 3px 4px;
  cursor:pointer; text-decoration:none;
  transition:transform .15s ease;
}
.kk-act:active{ transform:scale(.96); }
.kk-act-ico{
  width:24px; height:24px; border-radius:50%;
  background:var(--bg3);
  display:flex; align-items:center; justify-content:center;
  color:var(--fg2);
  flex:0 0 auto;
}
.kk-act-ico svg{ width:14px !important; height:14px !important; color:currentColor !important; stroke:currentColor !important; }
.kk-act b{
  font-size:10.5px !important; font-weight:700 !important;
  color:var(--fg2) !important; letter-spacing:.3px;
  text-align:center; line-height:1.2;
}

/* ============================================================
   二、Hello Kitty 主题（仅夜间模式）
   ============================================================ */
:root[data-theme="dark"]{
  --bg:#fff3f8; --bg2:#ffffff; --bg3:#ffeaf3; --bg4:#ffdcea;
  --line:#ffd9e8; --line2:#ffc8dd;
  --fg:#5f3f4b; --fg2:#a37e8c; --fg3:#c39fb0;
  --acc:#ff6fa5; --acc2:#ff4f8c;
  --ok:#ff8fbc; --bad:#ff5c7a; --warn:#ffa94d;
  --topBg:rgba(255,255,255,.92);
  --kk-cardline:#ffe0ec;
}

/* 背景：深粉夜色 + 波点 */
:root[data-theme="dark"] body{
  background:
    radial-gradient(circle at 16px 16px, rgba(255,255,255,.95) 2.2px, transparent 2.8px) 0 0/44px 44px,
    radial-gradient(circle at 38px 38px, rgba(255,175,208,.5) 2.6px, transparent 3.2px) 0 0/44px 44px,
    linear-gradient(180deg,#ffe6f1 0%, #fff7fb 38%, #ffeff7 100%) !important;
  background-attachment:fixed;
}
:root[data-theme="dark"] #main{ background:transparent !important; }

/* 顶栏 */
:root[data-theme="dark"] #top{
  background:linear-gradient(180deg,#ffd9e9,#ffeef6) !important;
  border-bottom:2px solid #ffd0e3 !important;
}
:root[data-theme="dark"] #top .icobtn{
  background:#ffffff !important; color:#ff6fa5 !important;
  border:1.5px solid #ffd0e3 !important; border-radius:50% !important;
}
:root[data-theme="dark"] #top .icobtn.acc{
  background:linear-gradient(135deg,#ff9ec4,#ff5f97) !important;
  color:#fff !important; border:0 !important;
}

/* 公告条 */
:root[data-theme="dark"] #noticeBar{
  background:#ffffff !important;
  border:2px solid #ffd9e8 !important;
  border-radius:16px !important;
}
:root[data-theme="dark"] #noticeBar .nb-ico{ color:#ff8fbc !important; }
:root[data-theme="dark"] #noticeBar .nb-seg b{ color:#ff6fa5 !important; }
:root[data-theme="dark"] #noticeBar .nb-seg i{ color:#c39fb0 !important; }

/* 卡片 */
:root[data-theme="dark"] .item,
:root[data-theme="dark"] .eg-cell,
:root[data-theme="dark"] .cd-card{
  background:#ffffff !important;
  border:2px solid #ffd9e8 !important;
  border-radius:20px !important;
  box-shadow:0 8px 20px rgba(255,95,151,.12) !important;
}
:root[data-theme="dark"] .item .ico,
:root[data-theme="dark"] .eg-ico{ border-radius:14px !important; }
:root[data-theme="dark"] .item .badge{
  background:#ffe3ef !important; color:#ff4f8c !important;
  border-radius:20px !important; font-weight:700;
}
:root[data-theme="dark"] .item .arw{ color:#ffb7d3 !important; }
:root[data-theme="dark"] .cd-card::before{ background:#ff9ec4 !important; }
:root[data-theme="dark"] .cd-cell{ background:#fff2f8 !important; border-radius:12px !important; }
:root[data-theme="dark"] .cd-cell > b{ color:#ff4f8c !important; }
:root[data-theme="dark"] .cd-tag.ok{ background:#ffe3ef !important; color:#ff4f8c !important; border:0 !important; }

/* 栏目小标题 + 透明底像素凯蒂猫动图 */
:root[data-theme="dark"] .sect{ color:#c39fb0 !important; letter-spacing:2px !important; font-weight:700 !important; }
:root[data-theme="dark"] .sect::before{
  content:"" !important;
  display:inline-block !important;
  width:18px !important; height:18px !important;
  min-width:18px !important;
  margin-right:5px !important;
  background:url("/assets/kitty/kitty-pixel-anim.gif?v=3") center/contain no-repeat !important;
  vertical-align:-4px;
  image-rendering:pixelated;
  animation:none !important;
}
:root[data-theme="dark"] .sect::after{ background:linear-gradient(90deg,#ffd0e3,transparent) !important; }

/* 考试科目：6 只真实凯蒂猫，隐藏原有线条图标 */
:root[data-theme="dark"] .eg-cell .eg-ico > svg{ display:none !important; visibility:hidden !important; }
:root[data-theme="dark"] .eg-cell .eg-ico{
  background-color:transparent !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:contain !important;
  box-shadow:none !important;
}
:root[data-theme="dark"] .eg-cell[data-examkey="econ-sr"] .eg-ico{ background-image:url("/assets/kitty/exam-econsr.png") !important; }
:root[data-theme="dark"] .eg-cell[data-examkey="bank-jr"] .eg-ico{ background-image:url("/assets/kitty/exam-bankjr.png") !important; }
:root[data-theme="dark"] .eg-cell[data-examkey="bank-sr"] .eg-ico{ background-image:url("/assets/kitty/exam-banksr.png") !important; }
:root[data-theme="dark"] .eg-cell[data-examkey="fund"]    .eg-ico{ background-image:url("/assets/kitty/exam-fund.png") !important; }
:root[data-theme="dark"] .eg-cell[data-examkey="sec"]     .eg-ico{ background-image:url("/assets/kitty/exam-sec.png") !important; }
:root[data-theme="dark"] .eg-cell[data-examkey="fut"]     .eg-ico{ background-image:url("/assets/kitty/exam-fut.png") !important; }

/* 功能入口在 Hello Kitty 主题下的粉色外观 */
:root[data-theme="dark"] .kk-act{
  background:#fff;
  border:2px solid #ffe0ec;
  border-radius:16px;
  box-shadow:0 6px 16px rgba(255,170,205,.12);
}
:root[data-theme="dark"] .kk-act-ico{
  background:#fff; box-shadow:0 0 0 1.5px #ffe0ec;
}
:root[data-theme="dark"] .kk-act-ico svg{ color:#ff5f97 !important; stroke:#ff5f97 !important; }
:root[data-theme="dark"] .kk-act b{
  font-family:"Yuanti SC","YouYuan","PingFang SC","Microsoft YaHei",sans-serif !important;
  color:#a05f78 !important;
}

/* 按钮 / 弹层 */
:root[data-theme="dark"] .btn{
  background:linear-gradient(135deg,#ff9ec4,#ff5f97) !important;
  color:#fff !important; border:0 !important; border-radius:14px !important;
}
:root[data-theme="dark"] .cfbox,
:root[data-theme="dark"] .sheet,
:root[data-theme="dark"] .modal{
  border-radius:24px !important;
  border:2px solid #ffe0ec !important;
}

/* ---------- 动效 ---------- */
.kk-act{ animation:kk-rise-in .4s cubic-bezier(.22,.61,.36,1) both; }
@keyframes kk-rise-in{ from{ transform:translateY(8px) } to{ transform:translateY(0) } }
@media (prefers-reduced-motion: reduce){ .kk-act{ animation:none !important; } }

/* ============================================================
   三、滚动锁定（首页不可上下拖动）
   ============================================================ */
html, body{ height:100% !important; overflow:hidden !important; overscroll-behavior:none !important; }
html body #main:has(.hp-wrap){
  overflow:hidden !important;
  overscroll-behavior:none !important;
  touch-action:pan-x !important;
}
@media (max-height: 700px){
  html body #main:has(.hp-wrap) .hp-page{ overflow-y:auto !important; -webkit-overflow-scrolling:touch !important; }
}

/* ---------- Hello Kitty 主题的补充修正 ---------- */
/* 1) 根元素背景（页面 JS 会把 html 背景设成 #131722，这里压掉，避免底部发黑） */
:root[data-theme="dark"]{ background:#fff3f8 !important; }

/* 2) 倒计时数字：回到主题粉 */
:root[data-theme="dark"] .cd-main .cd-num,
:root[data-theme="dark"] .cd-main .cd-cell b,
:root[data-theme="dark"] .cd-card .cd-num,
:root[data-theme="dark"] .cd-card .cd-cell > b{
  color:#ff4f8c !important;
  filter:none !important;
}
:root[data-theme="dark"] .cd-main .cd-cell,
:root[data-theme="dark"] .cd-card .cd-cell{ background:#fff2f8 !important; }
:root[data-theme="dark"] .cd-main .cd-cell i,
:root[data-theme="dark"] .cd-card .cd-cell i{ color:#a37e8c !important; }

/* 3) 功能入口图标：内联颜色也压成粉色 */
:root[data-theme="dark"] .kk-act-ico{ color:#ff5f97 !important; }
:root[data-theme="dark"] .kk-act-ico svg{ color:#ff5f97 !important; stroke:#ff5f97 !important; fill:none !important; }
:root[data-theme="dark"] .kk-act-ico svg path[fill="currentColor"],
:root[data-theme="dark"] .kk-act-ico svg path:not([stroke]){
  fill:#ff5f97 !important;
}

/* 4) 公告条文字不要变白 */
:root[data-theme="dark"] #noticeBar{ color:#a37e8c !important; }

/* 5) 倒计时数字（.cd-panel .cd-cell b）强制主题粉 —— 用最高特异性压过 hot/soon 状态色 */
:root[data-theme="dark"] body .cd-card .cd-panel > .cd-cell > b,
:root[data-theme="dark"] body .cd-card .cd-panel #cdDays,
:root[data-theme="dark"] body .cd-card .cd-panel #cdH,
:root[data-theme="dark"] body .cd-card .cd-panel #cdM,
:root[data-theme="dark"] body .cd-card .cd-panel #cdS{
  color:#ff4f8c !important;
  -webkit-text-fill-color:#ff4f8c !important;
  background:none !important;
}
:root[data-theme="dark"] body .cd-card .cd-panel > .cd-cell > s{
  color:#a37e8c !important;
}
:root[data-theme="dark"] body .cd-card .cd-panel > .cd-sep{
  color:#ffb7d3 !important;
}

/* 6) 功能入口图标底座：强制白色圆 + 粉描边（内联彩色底色是元素 style，必须 !important 压） */
:root[data-theme="dark"] .kk-act .kk-act-ico{
  background:#ffffff !important;
  background-image:none !important;
  box-shadow:0 0 0 1.5px #ffd0e3 !important;
  color:#ff5f97 !important;
}
:root[data-theme="dark"] .kk-act .kk-act-ico svg{
  color:#ff5f97 !important;
  stroke:#ff5f97 !important;
}

/* 7) 倒计时四宫格底色：压过站点自带的浅蓝底 */
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell,
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell > b,
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell > s{
  background-color:#fff2f8 !important;
  background-image:none !important;
}
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell{
  border:1.5px solid #ffd9e8 !important;
}
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell > b{
  background:transparent !important;
  color:#ff4f8c !important;
}
:root[data-theme="dark"] body #main .cd-card .cd-panel > .cd-cell > s{
  background:transparent !important;
  color:#a37e8c !important;
}

/* 8) 功能入口提到最上层，避免被 .hero / 轮播层盖住导致点不动 */
.hero.kk-hero{ position:relative !important; z-index:1 !important; }
.kk-hero-acts{ position:relative !important; z-index:2 !important; }
.kk-act{ position:relative !important; z-index:3 !important; }

/* ============================================================
   Hello Kitty 主题：科目页 / 其他内页补全（横幅、模式卡、列表图标）
   ============================================================ */
/* 科目页顶部横幅（深蓝 → 粉色） */
:root[data-theme="dark"] .hero:not(.kk-hero){
  background:linear-gradient(135deg,#ffd3e6 0%, #ffeaf4 55%, #fff3f9 100%) !important;
  border:2px solid #ffd0e3 !important;
  border-radius:20px !important;
  box-shadow:0 8px 22px rgba(255,143,188,.18) !important;
}
:root[data-theme="dark"] .hero:not(.kk-hero) h1{
  color:#c94a76 !important;
  font-family:"Yuanti SC","YouYuan","PingFang SC","Microsoft YaHei",sans-serif !important;
}
:root[data-theme="dark"] .hero:not(.kk-hero) .sub,
:root[data-theme="dark"] .hero:not(.kk-hero) p{
  color:#a86b84 !important;
}

/* 模式卡（练习 / 模拟考 / 背题） */
:root[data-theme="dark"] .mode > .mc{
  background:#ffffff !important;
  border:2px solid #ffe0ec !important;
  border-radius:20px !important;
  box-shadow:0 8px 20px rgba(255,143,188,.14) !important;
}
:root[data-theme="dark"] .mode > .mc:active{ border-color:#ffb7d3 !important; }
:root[data-theme="dark"] .mc b{ color:#5f3f4b !important; }
:root[data-theme="dark"] .mc span{ color:#a37e8c !important; }

/* 列表行图标：内联深色底 → 粉色圆底 */
:root[data-theme="dark"] .item .ico{
  background:#ffeaf3 !important;
  color:#ff5f97 !important;
  border-radius:50% !important;
  box-shadow:0 0 0 1.5px #ffd9e8 !important;
}

/* 小标签「两类题库」 */
:root[data-theme="dark"] .sect .tagn,
:root[data-theme="dark"] .tagn{
  background:#ffe3ef !important;
  color:#ff4f8c !important;
  border-radius:999px !important;
}

/* 空状态 / 加载 */
:root[data-theme="dark"] .empty{ color:#a37e8c !important; }
:root[data-theme="dark"] .empty .big{ color:#ffb7d3 !important; }

/* 弹窗（题库更新提醒 / 登录 / 确认框）也走 Hello Kitty 风格 */
:root[data-theme="dark"] #bk2611 .cfbox,
:root[data-theme="dark"] .cfbox,
:root[data-theme="dark"] .auth-box,
:root[data-theme="dark"] #authOv .box{
  background:#ffffff !important;
  border:2px solid #ffe0ec !important;
  border-radius:24px !important;
  box-shadow:0 18px 44px rgba(255,143,188,.28) !important;
}
:root[data-theme="dark"] #bk2611 .cfbox h3,
:root[data-theme="dark"] .cfbox h3{ color:#c94a76 !important; }
:root[data-theme="dark"] #bk2611 .bk2611-body,
:root[data-theme="dark"] .cfbox p{ color:#5f3f4b !important; }
:root[data-theme="dark"] #bk2611 .bk2611-body b{ color:#ff4f8c !important; }
:root[data-theme="dark"] #bk2611 .bk2611-path{ background:#fff3f9 !important; color:#a37e8c !important; }
:root[data-theme="dark"] #bk2611 .bk2611-path i{ color:#ff5f97 !important; }
:root[data-theme="dark"] .cfbox button.primary,
:root[data-theme="dark"] #bk2611Go,
:root[data-theme="dark"] .auth-submit{
  background:linear-gradient(135deg,#ff9ec4,#ff5f97) !important;
  color:#fff !important; border:0 !important; border-radius:14px !important;
}
:root[data-theme="dark"] .cfbox button.ghost,
:root[data-theme="dark"] #bk2611Off,
:root[data-theme="dark"] .cfbtns .ghost{
  background:#fff3f9 !important;
  color:#c94a76 !important;
  border:1.5px solid #ffd9e8 !important;
  border-radius:14px !important;
}
:root[data-theme="dark"] .auth-tabs a,
:root[data-theme="dark"] .auth-links a{ color:#ff5f97 !important; }
:root[data-theme="dark"] .auth-input,
:root[data-theme="dark"] .auth-box input{
  background:#fff7fb !important; border:1.5px solid #ffd9e8 !important;
  border-radius:12px !important; color:#5f3f4b !important;
}

/* 9) 补齐剩余主题变量：底栏(黑条) / 提示条 / 各种 dim 色 / 横幅光晕 */
:root[data-theme="dark"]{
  --barBg:rgba(255,250,252,.96);
  --toastBg:rgba(255,111,165,.95);
  --toastFg:#fff;
  --accdim:rgba(255,143,188,.16);
  --okdim:rgba(255,143,188,.16);
  --baddim:rgba(255,92,122,.14);
  --warndim:rgba(255,169,77,.16);
  --hero1:#ffe1ee; --hero2:#fff6fa; --heroGlow:rgba(255,143,188,.35);
  --shadow:0 8px 22px rgba(255,143,188,.16);
}
/* 底栏：粉色玻璃条 + 粉边 */
:root[data-theme="dark"] #actions{
  background:rgba(255,250,252,.96) !important;
  border-top:1px solid #ffd9e8 !important;
  box-shadow:0 -6px 20px rgba(255,143,188,.14) !important;
}
/* 底栏按钮 */
:root[data-theme="dark"] #actions .btn{
  background:#fff !important;
  color:#c94a76 !important;
  border:1.5px solid #ffd9e8 !important;
}
:root[data-theme="dark"] #actions .btn.pri{
  background:linear-gradient(135deg,#ff9ec4,#ff5f97) !important;
  color:#fff !important;
  border:0 !important;
}
/* 顶栏与题库工具条 */
:root[data-theme="dark"] #qzTools{
  background:rgba(255,250,252,.96) !important;
  border-top:1px solid #ffd9e8 !important;
}

/* ============================================================
   兜底配色：即使 <html data-theme="..."> 缺失或值异常，
   页面也有一套完整变量（与浅色主题一致），避免花屏/透明弹窗
   ============================================================ */
:root{
  --bg:#f2f4f8; --bg2:#ffffff; --bg3:#eef1f6; --bg4:#e3e8f0;
  --line:#e2e7f0; --line2:#d3dae6;
  --fg:#1a2233; --fg2:#55607a; --fg3:#8a95ab;
  --acc:#3b74e0; --acc2:#2f63cc; --accdim:rgba(59,116,224,.10);
  --ok:#2fbf71; --okdim:rgba(47,191,113,.14);
  --bad:#e5484d; --baddim:rgba(229,72,77,.12);
  --warn:#f5a524; --warndim:rgba(245,165,36,.14);
  --topBg:rgba(255,255,255,.92);
  --barBg:rgba(255,255,255,.96);
  --toastBg:rgba(26,34,51,.92); --toastFg:#fff;
  --hero1:#eef3ff; --hero2:#ffffff; --heroGlow:rgba(59,116,224,.25);
  --shadow:0 8px 22px rgba(26,34,51,.10);
  color-scheme:light;
}
