*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  min-height:100dvh;
  padding:22px 14px 40px;
  font-family:"PingFang SC","HarmonyOS Sans SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#3b3355;
  background:
    radial-gradient(900px 500px at 8% -8%, #ffe9b8 0%, transparent 60%),
    radial-gradient(800px 480px at 96% 2%, #d6f2ff 0%, transparent 55%),
    radial-gradient(760px 520px at 50% 108%, #ffe2f0 0%, transparent 60%),
    linear-gradient(170deg,#fffdf9,#f2f6ff 60%,#fdf6ff);
  background-attachment:fixed;
  -webkit-tap-highlight-color:transparent;
}

.app{ max-width:1180px; margin:0 auto; }

/* ---------- 顶部 ---------- */
.hero{ text-align:center; margin-bottom:20px; }

.hero .flag{
  display:block;
  font-size:clamp(34px,9vw,46px);
  animation:bob 2.6s ease-in-out infinite;
}
@keyframes bob{
  0%,100%{ transform:translateY(0) rotate(-5deg); }
  50%{ transform:translateY(-9px) rotate(5deg); }
}

.hero h1{
  margin:6px 0 8px;
  font-size:clamp(23px,6.2vw,40px);
  font-weight:900;
  letter-spacing:1px;
  background:linear-gradient(90deg,#ff7aa8,#ffa63d,#2ec4a6,#4c8dff);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero .sub{
  margin:0;
  font-size:clamp(12.5px,3.4vw,15px);
  font-weight:600;
  color:#7a7395;
}
.hero .sub b{ color:#3b3355; }

/* ---------- 今日进度条 ---------- */
.today-bar{
  display:flex;
  align-items:center;
  gap:10px;
  max-width:430px;
  margin:16px auto 0;
  padding:8px 8px 8px 16px;
  background:#fff;
  border:2px solid #fff;
  border-radius:999px;
  box-shadow:0 10px 22px -14px rgba(80,65,140,.85);
}
.tb-text{
  font-size:12.5px;
  font-weight:900;
  white-space:nowrap;
  color:#5a5278;
}
.tb-track{
  flex:1;
  height:10px;
  min-width:60px;
  background:#eef0f8;
  border-radius:999px;
  overflow:hidden;
}
.tb-fill{
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#ffd166,#06d6a0);
  transition:width .35s ease;
}
.tb-count{
  padding-right:10px;
  font-size:12px;
  font-weight:900;
  color:#a29bbd;
  font-variant-numeric:tabular-nums;
}

/* ---------- 科目标签 ---------- */
.stats{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin:0 auto 20px;
  max-width:820px;
}
.stat{
  display:flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  background:#fff;
  border:2px solid #fff;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  color:#4a4468;
  box-shadow:0 8px 18px -14px rgba(90,75,150,.9);
}
.stat i{ font-style:normal; font-size:15px; }
.stat .cnt{
  background:var(--sc);
  color:#fff;
  font-size:11.5px;
  line-height:18px;
  padding:0 7px;
  border-radius:999px;
}

/* ---------- 周课表 ---------- */
.week{
  display:grid;
  gap:14px;
  grid-template-columns:1fr;
}
@media (min-width:560px){ .week{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:880px){ .week{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:1180px){ .week{ grid-template-columns:repeat(4,1fr); } }

.day-card{
  padding:14px 14px 16px;
  background:rgba(255,255,255,.9);
  border:2px solid #fff;
  border-radius:22px;
  box-shadow:0 14px 28px -20px rgba(80,65,140,.95);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  animation:pop .45s both;
}
@keyframes pop{
  from{ opacity:0; transform:translateY(14px) scale(.97); }
  to{ opacity:1; transform:none; }
}

.day-card.today{
  background:linear-gradient(180deg,#fffdf2,#ffffff);
  border-color:#ffd166;
  box-shadow:0 0 0 4px rgba(255,209,102,.28), 0 18px 34px -20px rgba(255,150,60,.95);
}

.day-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:11px;
}
.day-name{
  font-size:17px;
  font-weight:900;
  letter-spacing:.5px;
}
.day-en{
  margin-left:5px;
  font-size:10px;
  font-weight:800;
  letter-spacing:1px;
  color:#c0bbd4;
}
.today-badge{
  font-size:11px;
  font-weight:900;
  color:#7a4b00;
  padding:3px 9px;
  border-radius:999px;
  background:linear-gradient(90deg,#ffe08a,#ffc93c);
  box-shadow:0 4px 10px -5px rgba(255,180,0,1);
  animation:pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ transform:scale(1); }
  50%{ transform:scale(1.07); }
}

/* ---------- 单节课 ---------- */
.lessons{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.lesson{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:9px 10px;
  border-radius:15px;
  background:var(--sb);
  color:var(--sc);
  font-size:14.5px;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  transition:transform .14s ease, opacity .2s ease;
}
.lesson:active{ transform:scale(.975); }

.lesson .emoji{ font-size:18px; line-height:1; }
.lesson .name{ flex:1; }
.lesson .time{
  font-size:11px;
  font-weight:800;
  opacity:.62;
  font-variant-numeric:tabular-nums;
}
.lesson .check{
  flex:0 0 20px;
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#fff;
  color:#d4d0e4;
  font-size:12px;
  font-weight:900;
  transition:background .2s ease, color .2s ease;
}

.lesson.done{ opacity:.62; }
.lesson.done .name{ text-decoration:line-through; text-decoration-thickness:2px; }
.lesson.done .check{ background:var(--sc); color:#fff; }

/* ---------- 提示 ---------- */
.tips{
  max-width:880px;
  margin:28px auto 0;
  padding:18px 20px 20px;
  background:rgba(255,255,255,.86);
  border:2px solid #fff;
  border-radius:24px;
  box-shadow:0 14px 28px -22px rgba(80,65,140,1);
}
.tips h2{
  margin:0 0 10px;
  font-size:16px;
  font-weight:900;
}
.tips ul{
  margin:0;
  padding-left:20px;
  color:#5d577a;
  font-size:13.5px;
  line-height:1.95;
}
.tips li::marker{ color:#ffb703; }
.tips b{ color:#3b3355; }

/* ---------- 重置按钮 & 页脚 ---------- */
.tools{ display:flex; justify-content:center; margin-top:22px; }

.reset{
  padding:10px 20px;
  border:none;
  border-radius:999px;
  background:#fff;
  color:#6b6489;
  font-family:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 10px 22px -16px rgba(80,65,140,1);
  transition:transform .15s ease, color .15s ease;
}
.reset:hover{ color:#e0518a; }
.reset:active{ transform:scale(.95); }

.foot{
  margin-top:26px;
  text-align:center;
  font-size:12.5px;
  font-weight:700;
  color:#a29bbd;
}

@media (max-width:400px){
  body{ padding:16px 10px 32px; }
  .day-card{ padding:12px; border-radius:18px; }
  .lesson{ font-size:14px; padding:8px 9px; }
}
