/* app.css — 英语蛙自研首页（/newhome）· 100% 原创代码
   四皮肤：green(默认 绿+灰) / blue / black / white，html[data-skin] 切换 */

:root, html[data-skin="green"] {
  --brand: #0E9F6E; --brand-deep: #0B7A54; --brand-soft: #E5F3EC; --brand-grad: linear-gradient(135deg, #2FBF8B, #0A7A55);
  --bg: #F2F4F3; --card: #FFFFFF; --line: #E4E8E6; --txt: #1F2A26; --txt2: #5F6B66; --txt3: #93A09A;
  --accent: #0E9F6E; --accent-soft: rgba(14,159,110,.10);
  --shadow: 0 4px 20px rgba(15, 42, 34, .06); --shadow-hover: 0 10px 30px -12px rgba(15, 42, 34, .18);
  --warn-bg: #FFF6E8; --warn-tx: #B7791F;
}
html[data-skin="blue"] {
  --brand: #4162FF; --brand-deep: #2F49C8; --brand-soft: #E8EDFF; --brand-grad: linear-gradient(135deg, #5A8DFF, #4162FF);
  --bg: #F5F7FB; --card: #FFFFFF; --line: #EAEEF6; --txt: #1F2A44; --txt2: #5B6B87; --txt3: #93A0BC;
  --accent: #4162FF; --accent-soft: rgba(65,98,255,.10);
  --shadow: 0 4px 20px rgba(31, 42, 68, .06); --shadow-hover: 0 10px 30px -12px rgba(31, 42, 68, .18);
  --warn-bg: #FFF6E8; --warn-tx: #B7791F;
}
html[data-skin="white"] {
  --brand: #4162FF; --brand-deep: #2F49C8; --brand-soft: #F0F3FE; --brand-grad: linear-gradient(135deg, #5A8DFF, #4162FF);
  --bg: #FDFDFE; --card: #FFFFFF; --line: #EDF0F5; --txt: #16202E; --txt2: #5C6B80; --txt3: #98A4B5;
  --accent: #4162FF; --accent-soft: rgba(65,98,255,.08);
  --shadow: 0 1px 3px rgba(22, 32, 46, .05); --shadow-hover: 0 6px 20px -8px rgba(22, 32, 46, .14);
  --warn-bg: #FFF6E8; --warn-tx: #B7791F;
}
html[data-skin="black"] {
  --brand: #2FBF8B; --brand-deep: #23996F; --brand-soft: #14231D; --brand-grad: linear-gradient(135deg, #14342A, #0D1F19);
  --bg: #101318; --card: #1A1F26; --line: #2A313B; --txt: #E8ECF1; --txt2: #A7B2BE; --txt3: #6B7683;
  --accent: #2FBF8B; --accent-soft: rgba(47,191,139,.12);
  --shadow: 0 4px 20px rgba(0, 0, 0, .4); --shadow-hover: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --warn-bg: #2A2318; --warn-tx: #E8B45A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--txt); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.frame { display: flex; min-height: 100vh; }

/* ---------- 左侧栏 ---------- */
.side { width: 200px; flex: 0 0 200px; background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side::-webkit-scrollbar { width: 0; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--brand); padding: 4px 8px 18px; }
.logo .frog { width: 30px; height: 30px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--txt2); font-weight: 500; font-size: 15px; transition: background .15s, color .15s; }
.menu a:hover { background: var(--bg); color: var(--txt); }
.menu a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.menu .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.menu a .em { width: 22px; text-align: center; font-size: 17px; }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; height: 60px; }
.topbar .greet { font-weight: 600; white-space: nowrap; }
.topbar .date { color: var(--txt3); font-size: 12.5px; white-space: nowrap; }
.search { flex: 1; max-width: 380px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1.5px solid transparent; border-radius: 999px; padding: 8px 16px; transition: border-color .15s; }
.search:focus-within { border-color: var(--brand); background: var(--card); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 13.5px; color: var(--txt); }
.tb-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.tb-links a, .tb-links button.tb { font-size: 12.5px; color: var(--txt2); padding: 7px 10px; border-radius: 10px; background: transparent; border: 0; white-space: nowrap; transition: .15s; }
.tb-links a:hover, .tb-links button.tb:hover { background: var(--bg); color: var(--txt); }
.avatar-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 999px; }
.avatar-chip img { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); }
.avatar-chip b { font-size: 13px; }
.btn-vip { background: var(--brand-grad); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ---------- 内容区 ---------- */
.content { padding: 20px 28px 40px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.loading { text-align: center; color: var(--txt3); padding: 80px 0; }
.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.sec-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sec-title .more { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--txt3); }
.sec-title .more:hover { color: var(--brand); }
/* 板块标题动态图标：火焰摇曳 / 星光闪烁（prefers-reduced-motion 用户自动关闭） */
.sec-title .ico { width: 18px; height: 18px; flex: 0 0 auto; margin-right: 4px; vertical-align: -3px; }
.ico-fire { animation: fireFlicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; filter: drop-shadow(0 2px 5px rgba(255, 92, 45, .45)); }
@keyframes fireFlicker {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  30% { transform: scale(1.08, 1.14) rotate(2deg); }
  60% { transform: scale(.96, 1.04) rotate(-1deg); }
}
.ico-spark { animation: sparkTwinkle 2.2s ease-in-out infinite; transform-origin: 50% 50%; filter: drop-shadow(0 2px 5px rgba(99, 102, 241, .4)); }
@keyframes sparkTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .92; }
  45% { transform: scale(1.16) rotate(14deg); opacity: 1; }
  70% { transform: scale(.94) rotate(-5deg); opacity: .96; }
}
@media (prefers-reduced-motion: reduce) { .ico-fire, .ico-spark { animation: none; } }

/* 欢迎卡 */
.welcome { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.welcome img.av { width: 52px; height: 52px; border-radius: 50%; background: var(--bg); }
.welcome .who b { font-size: 16px; }
.welcome .who .sub { font-size: 12.5px; color: var(--txt3); margin-top: 3px; }
.tag-vip { display: inline-block; font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 1px; }

/* 资料卡右侧：站点公告喇叭（最新 3 条轮换） */
.welcome .ann-slot{display:flex;align-items:center;justify-content:flex-end;min-width:0;flex:1;padding:0 6px}
.welcome .ann-slot:empty{display:none}
@media(max-width:1180px){.welcome .ann-slot{display:none}}

.welcome .nums { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.welcome .nums .n { text-align: center; }
.welcome .nums .n i { display: block; font-style: normal; font-size: 11.5px; color: var(--txt3); }
.welcome .nums .n b { font-size: 22px; font-weight: 700; }
.welcome .nums .n b.ac { color: var(--accent); }
.vline { width: 1px; height: 34px; background: var(--line); }
.btn-checkin { background: var(--brand-grad); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px -6px var(--accent); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); border-radius: 999px; padding: 9px 20px; font-weight: 600; font-size: 13.5px; }

/* 筛选条 */
.chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.chips .lab { font-size: 12px; color: var(--txt3); margin: 0 4px 0 8px; }
.chip { font-size: 12.5px; color: var(--txt2); background: var(--bg); border: 0; border-radius: 999px; padding: 5px 13px; transition: .15s; }
.chip:hover { color: var(--txt); }
.chip.on { background: var(--brand); color: #fff; font-weight: 600; }
.chips .all { margin-left: auto; font-size: 12.5px; color: var(--brand); font-weight: 500; }

/* 平台数据 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { border-radius: 16px; padding: 14px 18px; }
.stat i { font-style: normal; font-size: 12.5px; opacity: .75; }
.stat b { display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }
.stat.s1 { background: var(--accent-soft); color: var(--brand-deep); }
.stat.s2 { background: var(--warn-bg); color: var(--warn-tx); }
.stat.s3 { background: var(--brand-soft); color: var(--brand-deep); }
.stat.s4 { background: var(--accent-soft); color: var(--brand-deep); }
html[data-skin="blue"] .stat.s1, html[data-skin="blue"] .stat.s3 { background: var(--accent-soft); color: var(--brand-deep); }

/* 主栅格 */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; }

/* 快捷入口 */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
.quick a { text-align: center; padding: 14px 6px; border-radius: 14px; transition: .15s; }
.quick a:hover { background: var(--bg); transform: translateY(-2px); }
.quick .ic { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; background: var(--brand-soft); }
.quick p { font-size: 13px; font-weight: 600; }
.quick span { font-size: 11.5px; color: var(--txt3); }

/* 热门课程 */
.hot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 4px 16px 16px; }
@media (max-width: 900px) { .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ccard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .18s; display: block; }
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }
.ccard .cover { width: 100%; aspect-ratio: 16/10; background: var(--bg); display: block; object-fit: cover; }
.ccard .info { padding: 9px 11px 11px; }
.ccard .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .meta { font-size: 11.5px; color: var(--txt3); margin-top: 3px; }

/* 课程定制 banner：品牌渐变底 + 柔和光斑点缀 */
.cbn { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 16px; text-decoration: none;
  background: var(--brand-grad); box-shadow: 0 10px 22px -12px var(--brand); overflow: hidden; position: relative; transition: transform .16s, box-shadow .16s; }
.cbn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px var(--brand); }
.cbn .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.cbn .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cbn .tx b { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.cbn .tx i { font-style: normal; font-size: 12px; color: rgba(255,255,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbn .go { flex: 0 0 auto; background: #fff; color: var(--brand); border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cbn::after { content: ""; position: absolute; right: 84px; top: -18px; width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none; }
.cbn::before { content: ""; position: absolute; right: -22px; bottom: -30px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
@media (max-width: 900px) { .cbn .tx i { display: none; } .cbn .go { padding: 7px 12px; } }

/* 荣耀榜 */
.rank-card { padding: 16px; }
/* 荣耀榜切换页签：学习榜 / 收益榜 */
.rank-tabs { display: flex; gap: 8px; margin: 10px 0 6px; }
.rank-tabs .rt { flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--txt2); border-radius: 999px; padding: 7px 0; font-size: 12.5px; font-weight: 600; transition: .15s; }
.rank-tabs .rt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 实时动态播报卡（新条目从顶部滑入，最多保留 6 条） */
.feed-card { padding: 14px 16px; }
.feed-card .sec-title { margin-bottom: 8px; }
.tk-dot { width: 7px; height: 7px; border-radius: 50%; background: #E5484D; margin-left: 8px; animation: tkPulse 1.4s ease-in-out infinite; }
@keyframes tkPulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.ticker { display: flex; flex-direction: column; overflow: hidden; }
.tk-row { font-size: 12.5px; line-height: 19px; color: var(--txt2); padding: 5px 8px; border-radius: 9px; background: var(--bg); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: tkIn .45s ease; }
.tk-row:nth-child(odd) { background: transparent; }
.tk-ago { display: inline-block; font-size: 10.5px; font-weight: 700; color: #E5484D; background: rgba(229, 72, 77, .09); border-radius: 6px; padding: 0 6px; margin-right: 7px; vertical-align: 1px; }
.tk-join { color: var(--brand); font-weight: 600; }
.tk-vip, .tk-earn, .tk-wd { color: var(--warn-tx); }
.tk-learn, .tk-study { color: var(--txt2); }
.tk-leader, .tk-partner { color: #8A5A28; font-weight: 600; }
@keyframes tkIn { from { opacity: 0; transform: translateY(-9px); } to { opacity: 1; transform: none; } }
/* 合伙人宣传卡（仿「成为课件啦合伙人」） */
.partner-ad { padding: 22px 18px 20px; text-align: center; }
.partner-ad .pa-ico { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.partner-ad b { display: block; font-size: 15.5px; color: var(--txt); }
.partner-ad p { font-size: 12px; color: var(--txt3); margin: 7px 0 12px; line-height: 1.6; }
.partner-ad .pa-go { display: inline-block; font-size: 13px; font-weight: 700; color: var(--warn-tx); }
.partner-ad .pa-go:hover { text-decoration: underline; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 13px; }
.rank-item .no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--txt3); }
.rank-item.r1 .no { background: #FFD766; color: #7A5800; }
.rank-item.r2 .no { background: #E3E8EF; color: #5B6B87; }
.rank-item.r3 .no { background: #F5D9C0; color: #8A5A28; }
.rank-item img { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); }
.rank-item .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-item .sc { color: var(--txt3); font-size: 12.5px; white-space: nowrap; flex: none; }
.rank-me { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 12.5px; color: var(--brand); display: flex; justify-content: space-between; }

/* 会员横幅 / 每日一句 */
.daily { padding: 14px 18px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.daily .en { font-size: 14.5px; font-weight: 700; color: var(--brand); }
.daily .cn { font-size: 12.5px; color: var(--txt2); margin-top: 4px; }
.daily .say { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--brand); color: var(--brand); background: transparent; font-size: 14px; }

/* 换肤（顶栏入口） */
.tb-links .skin-wrap { position: relative; display: inline-flex; align-items: center; }
.tb-links .skin-btn { background: transparent; border: 0; font-size: 16px; line-height: 1; cursor: pointer; padding: 7px 8px; border-radius: 10px; transition: background .15s; }
.tb-links .skin-btn:hover { background: var(--bg); }
.tb-links .skin-pop { display: none; position: absolute; top: calc(100% + 12px); right: 0; z-index: 99; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow-hover); white-space: nowrap; }
.tb-links .skin-pop.on { display: flex; gap: 4px; }
.tb-links .skin-pop .it { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--txt2); cursor: pointer; transition: .15s; }
.tb-links .skin-pop .it:hover { background: var(--bg); }
.tb-links .skin-pop .it i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.tb-links .skin-pop .it.on { background: var(--brand-soft); color: var(--brand); }

.empty { text-align: center; color: var(--txt3); padding: 20px 0; font-size: 13px; }
.toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); background: var(--txt); color: var(--card); padding: 9px 18px; border-radius: 12px; font-size: 13px; z-index: 999; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.on { opacity: .92; }

@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .side { display: none; }
  .tb-links a, .tb-links button.tb { display: none; }
  .tb-links .avatar-chip, .tb-links .btn-vip { display: flex; }
}

/* 欢迎卡内每日一句 */
.dsay { margin-left: 26px; padding-left: 22px; border-left: 1px solid var(--line); min-width: 0; }
.dsay .en { font-size: 14.5px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.dsay .cn { font-size: 12px; color: var(--txt3); margin-top: 3px; }
/* 领取免费体验卡按钮（右侧，与数据区保持呼吸距离，仅非会员显示）：橙渐变胶囊 */
.rzone { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.btn-trial { flex: 0 0 auto; margin-right: 20px; border: 0; border-radius: 999px; padding: 10px 18px; font-size: 13.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #F6B24B, #D97B16); box-shadow: 0 6px 14px -6px rgba(217, 123, 22, .55); white-space: nowrap; transition: filter .15s, transform .15s; }
.btn-trial:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-trial:active { transform: translateY(0) scale(.97); }
.say { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--brand); background: transparent; color: var(--brand); font-size: 13px; display: grid; place-items: center; transition: .15s; flex: 0 0 auto; }
.say:hover { background: var(--brand-soft); }
.say.busy { opacity: .6; animation: sayPulse 1s ease-in-out infinite; }
@keyframes sayPulse { 50% { transform: scale(1.12); } }
@media (max-width: 900px) { .dsay { display: none; } }
