/* ============================================================
   keira · 预览 v3（PXLKIT 深夜模式）
   近黑底 + 网格 + 星点；绿色压低亮度，避免夜间刺眼
   正文用系统字体，标题和大数字保留像素字
   ============================================================ */

@font-face {
  font-family: 'FusionPixel';
  src: url('../fonts/fusion-pixel-12px-sc.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 浅色文字，但不过白 */
  --ink: #D3E6DA;
  --ink-2: #98B4A6;
  --ink-3: #6B8578;

  /* 面板 */
  --paper: #0E1417;
  --paper-2: #131B1F;
  --paper-3: #1A2428;

  /* 强调：全部降饱和 */
  --sun: #7FA968;      /* 雾绿 */
  --sun-2: #BE9C5E;    /* 暗金 */
  --sun-3: #1E2A22;
  --green: #4FAF82;    /* 灰绿，进度条 / 完成态 */
  --green-2: #86CFA9;
  --red: #B85163;      /* 暗红 */
  --blue: #3F7E93;     /* 暗青 */
  --purple: #8C78BE;   /* 夜紫，少量点缀 */
  --purple-2: #5E4B8C;

  --bd: 3px solid #29363C;
  --bd-2: 2px solid #29363C;
  --sh: 6px 6px 0 #000;
  --sh-s: 4px 4px 0 #000;
  --sh-xs: 3px 3px 0 #000;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  background: #07090C;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: auto;
  text-rendering: optimizeLegibility;
}

/* ---------- 标题 / 大数字：像素字，辉光只留一点 ---------- */
.brand, .hero__title, .page-head h1, .card__head h2, .ddl-group__head h2,
.count__num, .gpa-strip__num, .gpa-hero__num, .count__name {
  font-family: 'FusionPixel', 'Microsoft YaHei', monospace;
}
.brand { font-size: 24px; letter-spacing: 1px; color: #9CCB87; text-shadow: 0 0 8px rgba(79, 175, 130, .28); }
.hero__title, .page-head h1 { font-size: 34px; letter-spacing: 1px; text-shadow: 0 0 10px rgba(79, 175, 130, .18); }
.card__head h2, .ddl-group__head h2 { font-size: 19px; letter-spacing: .5px; }

/* ---------- 背景：近黑 + 网格 + 稀疏星点 + 低亮光晕 ---------- */
body::before {
  background:
    radial-gradient(55% 45% at 82% 2%, rgba(52, 148, 106, .10), transparent 70%),
    radial-gradient(45% 38% at 10% 10%, rgba(96, 74, 150, .18), transparent 70%),
    radial-gradient(60% 45% at 50% 106%, rgba(52, 148, 106, .08), transparent 70%),
    #07090C;
}
body::after {
  opacity: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1.4px);
  background-size: 28px 28px, 28px 28px, 28px 28px;
  background-position: 0 0, 0 0, 14px 14px;
}

/* 星点：数量和亮度都收一半 */
.scene { display: block; }
.scene__sun, .scene__cloud { display: none; }
.scene::before, .scene::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  background: transparent;
}
.scene::before {
  box-shadow:
     140px  90px 0 0 rgba(156, 203, 135, .45),
     330px 210px 0 0 rgba(79, 175, 130, .30),
     540px 110px 0 0 rgba(255, 255, 255, .20),
     780px 260px 0 0 rgba(110, 160, 180, .35),
    1010px 130px 0 0 rgba(156, 203, 135, .30),
    1260px 220px 0 0 rgba(140, 120, 190, .45),
    1490px 120px 0 0 rgba(255, 255, 255, .20),
    1390px 430px 0 0 rgba(79, 175, 130, .25),
      90px 560px 0 0 rgba(255, 255, 255, .18),
     280px 730px 0 0 rgba(156, 203, 135, .22),
     470px 460px 0 0 rgba(140, 120, 190, .35),
     690px 650px 0 0 rgba(110, 160, 180, .22),
     920px 540px 0 0 rgba(79, 175, 130, .25),
    1130px 720px 0 0 rgba(255, 255, 255, .18),
    1360px 660px 0 0 rgba(156, 203, 135, .20),
    1560px 780px 0 0 rgba(140, 120, 190, .22);
}
.scene::after {
  width: 4px;
  height: 4px;
  opacity: .45;
  box-shadow:
     430px 160px 0 0 rgba(255, 255, 255, .22),
     880px 350px 0 0 rgba(156, 203, 135, .20),
    1200px 100px 0 0 rgba(79, 175, 130, .20),
    1450px 570px 0 0 rgba(110, 160, 180, .18),
     180px 350px 0 0 rgba(140, 120, 190, .18);
}

/* ---------- 首页 hero：深色星空条 ---------- */
.hero__sky {
  height: 56px;
  background:
    radial-gradient(60% 140% at 18% 130%, rgba(52, 148, 106, .18), transparent 60%),
    radial-gradient(55% 130% at 88% -30%, rgba(96, 74, 150, .22), transparent 62%),
    #0A0F12;
  border-bottom: var(--bd);
}
.hero__sky .hero__sun,
.hero__sky .hero__cloud { display: none; }
.hero__sky::before,
.hero__sky::after { display: none; }

/* ---------- 倒计时：深橄榄绿卡片，浅绿字，不再是一整块亮色 ---------- */
.count {
  background: linear-gradient(150deg, #22301F, #1A271B 55%, #16211A);
  color: #CFEABD;
  border-color: #3B3352;   /* 紫调描边 */
}
.count__num, .count__name { color: #DCF3CB; }
.count__place { color: rgba(220, 243, 203, .68); border-top-color: rgba(220, 243, 203, .22); }
.count__date { color: rgba(220, 243, 203, .68); }
.count__label::before { background: #B85163; border-color: rgba(220, 243, 203, .35); }
.brand__mark { background: #7FA968; }
.brand__mark::after { background: #0A120C; }

/* ---------- 按钮 / 标签 / 图标：暗底 + 浅字 ---------- */
.btn {
  background: #253B2B;
  border-color: #36493B;
  color: #CFE8C4;
  box-shadow: var(--sh-xs);
}
.btn:hover { background: #2D4733; }
.btn--ghost { background: var(--paper-2); color: var(--ink); }
.btn--ghost:hover { background: var(--paper-3); }
.btn--green { background: #234A36; color: #BFE8C8; }
.btn--green:hover { background: #2A5740; }

.sec-icon { background: #2A2340; color: #C3B3E8; border-color: #3B3352; }
.sec-icon--green { background: #1F3B2C; color: #A9D9B8; }
.sec-icon--paper { color: var(--ink); background: var(--paper-3); }

/* 卡片图钉：第一张改夜紫，第二张保留绿 */
.pin { background: var(--purple); }
.pin--green { background: #4FAF82; }
.pin--red { background: var(--red); }

.tag--exam { background: #5E2A36; color: #F0C9D0; }
.tag--class { background: #21485A; color: #BFE0EA; }
.tag--green { background: #234A35; color: #BFE8C8; }
.tag--other { background: #241E33; color: #C9BDE6; }

.dock__btn.is-active { background: #24402B; color: #CFEDBC; }
.dock__btn.is-active::before { background: var(--purple); }

.check.is-checked { color: #0B1A12; }

/* ---------- 深色面板修补 ---------- */
.goal { background: #0C1216; }
.bubble { background: var(--paper-2); }
.bubble:hover { box-shadow: 5px 5px 0 #000; }

.addbar__input, .addbar__time { background: #0C1216; color: var(--ink); }
.addbar__input::placeholder { color: var(--ink-3); }

.bar { background: #0B1116; }
.thing--overdue { background: #241318; }
.thing--checked { background: #0D1D16; }
.subject--done { background: #0C1A14; }
.check { background: #0C1216; }
.check:hover { background: var(--sun-3); }
.empty { background: rgba(255, 255, 255, .03); }

.done__toggle { color: var(--ink); }
.subject, .comp { background: var(--paper); }
.scale__cell { background: #0C1216; }

/* 聊天气泡 */
.chat { background: var(--paper); box-shadow: 8px 8px 0 #000; }
.chat__body { background: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 100% 6px; }
.msg--keira { background: #0C1216; }
.msg--me { background: #17261D; }
.chat__close { background: #0C1216; color: var(--ink); }
.chat__chip { background: #0C1216; border-color: #29363C; color: var(--ink-2); }
.chat__chip:hover { background: #241E33; color: #D9CFEF; }
.link:hover { border-bottom-color: var(--purple); }
.chat__input { background: #0C1216; color: var(--ink); }
.chat__send { background: #234A36; color: #BFE8C8; }

/* 描边 / 分隔线 */
.row { border-top-color: rgba(211, 230, 218, .08); }
.goals { border-top-color: rgba(211, 230, 218, .1); }
.done { border-top-color: rgba(211, 230, 218, .1); }
.done__row { border-bottom-color: rgba(211, 230, 218, .06); }
.ddl-group__rule, .day__rule { background: rgba(211, 230, 218, .06); }
.gpa-strip__sep { background: rgba(211, 230, 218, .1); }
.dock__btn { border-right-color: rgba(211, 230, 218, .08); }
.event__time { border-right-color: rgba(211, 230, 218, .1); }
.subject__foot { border-top-color: rgba(211, 230, 218, .08); }
.scale { border-top-color: rgba(211, 230, 218, .08); }

/* 顶部与页脚文字 */
.topbar__meta { color: var(--ink-2); }
.footer__meta { color: var(--ink-3); }

/* 页脚草地原来是亮绿，压暗 */
.footer__grass { filter: brightness(.4) saturate(.45); opacity: .7; }

/* ---------- 背景漂浮的像素图标：更暗更稀 ---------- */
.float-art {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.fi {
  position: absolute;
  width: 44px;
  height: 44px;
  opacity: .08;
  animation: floatBob 9s ease-in-out infinite;
}
.fi use { color: inherit; }
.fi-1 { top: 12%; left: 6%; color: #7FA968; width: 56px; height: 56px; animation-delay: -1s; }
.fi-2 { top: 30%; right: 5%; color: #9CCB87; width: 64px; height: 64px; animation-delay: -3s; }
.fi-3 { top: 62%; left: 4%; color: #8C78BE; width: 48px; height: 48px; animation-delay: -5s; }
.fi-4 { top: 78%; right: 8%; color: #6E9FB0; width: 52px; height: 52px; animation-delay: -2s; }
.fi-5 { top: 8%; right: 22%; color: #8C78BE; width: 40px; height: 40px; animation-delay: -4s; }
.fi-6 { top: 48%; left: 12%; color: #BE9C5E; width: 40px; height: 40px; animation-delay: -6s; }
.fi-7 { top: 88%; left: 22%; color: #7FA968; width: 36px; height: 36px; animation-delay: -2.5s; }
.fi-8 { top: 22%; left: 28%; color: #6E9FB0; width: 36px; height: 36px; animation-delay: -4.5s; }
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(79, 175, 130, .22); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
