/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base ── */
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #0f0f1a;
  color: #e2e8f0;
  min-height: 100vh;
  padding: 2rem;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.6rem;
  background: linear-gradient(135deg, #34d399, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#clock {
  font-size: 0.9rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  background: #1e1e2e;
  border: 1px solid #3b3b5c;
  color: #34d399;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

/* ── Stat cards ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat {
  background: #1e1e2e;
  border: 1px solid #2d2d44;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.stat .value {
  font-size: 2rem;
  font-weight: 700;
  color: #34d399;
}

.stat .desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* ── Section title ── */
.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

/* ── Progress bars ── */
.topics {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.topic-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topic-name {
  width: 100px;
  font-size: 0.85rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: #1e1e2e;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669, #3b82f6);
  transition: width 1s ease;
}

.pct {
  font-size: 0.8rem;
  color: #64748b;
  width: 36px;
  text-align: right;
}

/* ── File tree ── */
.file-tree {
  background: #12121f;
  border: 1px solid #2d2d44;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
}

.tree-item {
  padding: 0.35rem 0;
  color: #64748b;
}

.tree-item.folder { color: #e2e8f0; font-weight: 600; }
.tree-item.active { color: #94a3b8; }

.tag {
  display: inline-block;
  background: #1e1e2e;
  border: 1px solid #2d2d44;
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 0 0.4rem;
  color: #34d399;
  margin-left: 0.5rem;
}

/* ── Activity log ── */
.log {
  background: #1e1e2e;
  border: 1px solid #2d2d44;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #2d2d44;
  font-size: 0.85rem;
}

.log-entry:last-child { border-bottom: none; }

.log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.dot-green  { background: #22c55e; }
.dot-blue   { background: #3b82f6; }
.dot-purple { background: #a78bfa; }

.log-time {
  color: #334155;
  min-width: 60px;
}

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 0.75rem;
  color: #334155;
}
