:root {
  --bg: #0e1013;
  --card: #171a20;
  --card-2: #1b1f27;
  --line: rgba(255, 255, 255, 0.07);
  --text: #e9e9e6;
  --muted: #9aa1a9;
  --dim: #6d747c;
  --accent: #ffcc0d;
  --accent-ink: #171105;
  --green: #58d68d;
  --red: #f26d6d;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 204, 13, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(88, 214, 141, 0.05), transparent 55%),
    var(--bg);
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand .dot { color: var(--accent); margin: 0 6px; }

.topmeta {
  color: var(--dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.card-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

/* 时钟 */
.clock { grid-column: 1 / 7; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; }
.clock-time {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  margin-top: 18px;
  font-size: 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock-date .sep {
  width: 1px;
  height: 16px;
  background: var(--line);
}
.clock-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--dim);
}
.clock-note b { color: var(--accent); font-weight: 600; }

/* 天气 */
.weather { grid-column: 7 / 13; grid-row: 1; }
.loc-btn {
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.loc-btn:hover { color: var(--text); border-color: var(--accent); }
.weather-main { display: flex; align-items: center; gap: 18px; }
.weather-icon { font-size: 46px; line-height: 1; }
.weather-temp { font-size: 52px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.weather-temp sup { font-size: 24px; color: var(--muted); }
.weather-side { flex: 1; min-width: 0; }
.weather-city { font-size: 16px; font-weight: 600; }
.weather-sub { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* 节假日 */
.holidays { grid-column: 7 / 13; grid-row: 2; }
.holiday-next {
  font-size: 20px;
  font-weight: 600;
}
.holiday-next small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.holiday-next b { color: var(--accent); }
.holiday-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.holiday-list li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}
.holiday-list li span { color: var(--text); }

/* 项目 */
.projects { grid-column: 1 / 13; grid-row: 3; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.project {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color .15s, transform .15s;
}
.project:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(255, 204, 13, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 10px;
}
.project h3 { margin: 0 0 6px; font-size: 16px; }
.project p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* 待办 */
.todo { grid-column: 1 / 5; grid-row: 4; }
.todo-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.todo-form input:focus { border-color: var(--accent); }
.todo-form input::placeholder { color: var(--dim); }
.todo-list { list-style: none; margin: 12px 0 0; padding: 0; }
.todo-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.todo-list li:last-child { border-bottom: 0; }
.todo-list input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex: none;
  cursor: pointer;
}
.todo-list .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-list li.done .txt { text-decoration: line-through; color: var(--dim); }
.todo-list .del {
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 15px;
  padding: 2px 6px;
}
.todo-list .del:hover { color: var(--red); }

/* 便签 */
.notes { grid-column: 5 / 9; grid-row: 4; }
.save-hint { margin-left: auto; font-size: 11px; color: var(--dim); letter-spacing: 0; }
.notes textarea {
  width: 100%;
  height: 150px;
  resize: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding: 12px;
  outline: none;
  font-family: inherit;
}
.notes textarea:focus { border-color: var(--accent); }
.notes textarea::placeholder { color: var(--dim); }

/* 每日一句 */
.quote { grid-column: 9 / 13; grid-row: 4; display: flex; flex-direction: column; }
.quote-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  flex: 1;
}
.quote-src { margin-top: 10px; color: var(--dim); font-size: 12px; text-align: right; }

/* 快捷链接 */
.links { grid-column: 1 / 13; grid-row: 5; }
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.link-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color .15s, color .15s;
}
.link-list a:hover { border-color: var(--accent); color: var(--accent); }

.foot {
  margin-top: 22px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}

@media (max-width: 920px) {
  .clock, .weather, .holidays, .projects, .todo, .notes, .quote, .links {
    grid-column: 1 / 13;
    grid-row: auto;
  }
  .project-grid { grid-template-columns: 1fr; }
}
