:root {
  --bg: #0d1117;
  --card: #161b22;
  --card-hover: #1b212a;
  --border: #2d333b;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  --purple: #bc8cff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  padding: 24px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto 24px;
}
header h1 { font-size: 1.5rem; font-weight: 600; }
.date { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.head-right { text-align: right; }
.clock {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.tz { color: var(--muted); font-size: 0.8rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: background 0.2s;
}
.card:hover { background: var(--card-hover); }
.card h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.loc { text-transform: none; letter-spacing: 0; }
.muted-note { text-transform: none; letter-spacing: 0; font-weight: 400; }
.loading { color: var(--muted); font-size: 0.9rem; padding: 8px 0; }
.updated { color: var(--muted); font-size: 0.72rem; margin-top: 10px; }

/* Weather */
.weather-main { display: flex; align-items: center; gap: 16px; }
.weather-temp { font-size: 2.6rem; font-weight: 700; }
.weather-icon { font-size: 2.6rem; }
.weather-desc { color: var(--muted); margin-top: 4px; font-size: 0.9rem; }
.weather-forecast {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.forecast-item { text-align: center; font-size: 0.85rem; }
.forecast-item .day { color: var(--muted); }
.forecast-item .icon { font-size: 1.3rem; margin: 4px 0; }

/* Crypto / FX */
.crypto-list { display: flex; flex-direction: column; }
.crypto-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 0.95rem;
}
.crypto-row + .crypto-row { border-top: 1px solid var(--border); }
.crypto-row .sym { font-weight: 600; min-width: 64px; }
.crypto-row .name { color: var(--muted); font-size: 0.82rem; flex: 1; }
.crypto-row .price { font-variant-numeric: tabular-nums; font-weight: 600; }
.crypto-row .chg {
  min-width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.chg.up { color: var(--green); }
.chg.down { color: var(--red); }

/* News */
.news-list { display: flex; flex-direction: column; }
.news-item { padding: 9px 0; font-size: 0.92rem; line-height: 1.4; }
.news-item + .news-item { border-top: 1px solid var(--border); }
.news-item a { color: var(--text); text-decoration: none; }
.news-item a:hover { color: var(--accent); }
.news-item .meta { color: var(--muted); font-size: 0.75rem; margin-top: 3px; }

/* Todos */
#todo-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  outline: none;
  margin-bottom: 8px;
}
#todo-input:focus { border-color: var(--accent); }
.todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.todo + .todo { border-top: 1px solid var(--border); }
.todo input[type="checkbox"] { accent-color: var(--green); width: 16px; height: 16px; cursor: pointer; }
.todo label { flex: 1; cursor: pointer; font-size: 0.93rem; }
.todo.done label { text-decoration: line-through; color: var(--muted); }
.todo .del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
}
.todo .del:hover { color: var(--red); }

/* Quote */
.quote { font-style: italic; font-size: 1.02rem; line-height: 1.55; }
.quote-author { color: var(--muted); margin-top: 10px; font-size: 0.85rem; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 28px;
}
@media (max-width: 640px) {
  body { padding: 14px; }
  .clock { font-size: 1.5rem; }
}
