* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0d1117; color: #c9d1d9; min-height: 100vh; overflow-x: hidden; }

/* Layout */
nav { background: #161b22; border-bottom: 1px solid #30363d; padding: 0.75rem 2rem; display: flex; gap: 0; align-items: center; }
nav .brand { display: flex; align-items: center; margin-right: 2rem; cursor: pointer; }
nav .brand svg { flex-shrink: 0; }
nav .nav-links { display: flex; gap: 0.25rem; align-items: center; }
nav .nav-links a { color: #8b949e; text-decoration: none; cursor: pointer; transition: color 0.15s, background 0.15s; font-size: 0.95rem; font-weight: 500; padding: 0.5rem 1rem; border-radius: 6px; }
nav .nav-links a:hover { color: #f0f6fc; background: #21262d; }
nav .nav-links a.active { color: #f0f6fc; background: #1f6feb22; }
#app { max-width: 960px; margin: 2rem auto; padding: 0 1.5rem; }

/* Components */
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem; }
.card h2 { color: #f0f6fc; margin-bottom: 0.75rem; }
.card p { color: #8b949e; line-height: 1.6; }

button { background: #238636; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: background 0.15s; }
button:hover { background: #2ea043; }
button.secondary { background: #30363d; }
button.secondary:hover { background: #484f58; }
button.danger { background: #da3633; }
button.danger:hover { background: #f85149; }

input, textarea { background: #0d1117; color: #c9d1d9; border: 1px solid #30363d; padding: 0.5rem; border-radius: 6px; font-size: 0.9rem; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; }
input:focus, textarea:focus { outline: none; border-color: #58a6ff; }

.flex { display: flex; gap: 0.75rem; align-items: center; }
.mt { margin-top: 1rem; }
.badge { background: #1f6feb; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.75rem; }

/* Todo styles */
.todo-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid #21262d; }
.todo-item.done span { text-decoration: line-through; color: #484f58; }
.todo-item span { flex: 1; min-width: 0; }
.todo-item input[type="checkbox"] { flex-shrink: 0; width: 18px; height: 18px; cursor: pointer; accent-color: #58a6ff; }
.todo-item button { flex-shrink: 0; }

/* Counter */
.counter-display { font-size: 3rem; font-weight: 700; color: #58a6ff; text-align: center; margin: 1rem 0; font-variant-numeric: tabular-nums; }

/* Transition */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sidebarSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile nav toggle button */
.mobile-nav-toggle { display: none; background: none !important; border: none; cursor: pointer; padding: 0.5rem; margin-left: auto; flex-direction: column; gap: 5px; }
.mobile-nav-toggle:hover { background: none !important; }
.mobile-nav-toggle span { display: block; width: 22px; height: 2px; background: #c9d1d9; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
nav.nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
nav.nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile breakpoint */
@media (max-width: 768px) {
  nav { flex-wrap: wrap; padding: 0.75rem 1rem; }
  nav .brand { margin-right: 0; }
  nav .brand svg { width: 40px; height: 40px; }
  .mobile-nav-toggle { display: flex; }
  nav .nav-links { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-top: 0.75rem; border-top: 1px solid #30363d; margin-top: 0.75rem; }
  nav.nav-open .nav-links { display: flex; }
  nav .nav-links a { padding: 0.65rem 0.75rem; border-radius: 6px; font-size: 1rem; }
  nav .nav-links a:hover, nav .nav-links a.active { background: #21262d; }
  #app { padding: 0 0.75rem; margin: 1rem auto; max-width: 100%; overflow-x: hidden; }
  .card { padding: 1rem; }
}
