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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

/* Navbar */
.navbar {
  background: #1e293b;
  padding: 1rem 0;
  border-bottom: 1px solid #334155;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.25rem; font-weight: 700; color: #38bdf8; text-decoration: none; }
.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.875rem;
}
.nav-links a:hover { color: #38bdf8; }

/* Hero */
.hero { text-align: center; padding: 4rem 0; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; color: #f1f5f9; }
.hero p { font-size: 1.125rem; color: #94a3b8; margin-bottom: 2rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: #7dd3fc; }
.btn-secondary { background: #334155; color: #e2e8f0; margin-left: 0.5rem; }
.btn-secondary:hover { background: #475569; }
.btn-google { background: #ea4335; color: white; }
.btn-google:hover { background: #f06b60; }
.btn-github { background: #333; color: white; }
.btn-github:hover { background: #555; }

/* Cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 3rem 0; }
.card {
  background: #1e293b;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #334155;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: #94a3b8; font-size: 0.9375rem; }

/* Flash */
.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.flash.error { background: #7f1d1d; color: #fecaca; border: 1px solid #991b1b; }
.flash.success { background: #14532d; color: #bbf7d0; border: 1px solid #166534; }

/* Auth */
.auth-form {
  max-width: 400px; margin: 4rem auto;
  background: #1e293b; padding: 2rem; border-radius: 8px; border: 1px solid #334155;
}
.auth-form h2 { margin-bottom: 1.5rem; text-align: center; }
.auth-form input {
  width: 100%; padding: 0.75rem; margin-bottom: 1rem;
  background: #0f172a; border: 1px solid #334155; border-radius: 6px;
  color: #e2e8f0; font-size: 0.9375rem;
}
.auth-form input:focus { outline: none; border-color: #38bdf8; }
.auth-form .btn { width: 100%; }
.or-divider { text-align: center; color: #64748b; margin: 1rem 0; }
.oauth-links { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-alt { text-align: center; margin-top: 1rem; color: #94a3b8; font-size: 0.875rem; }
.auth-alt a { color: #38bdf8; }

/* Dashboard */
.dashboard { margin: 2rem 0; }
.dashboard h2 { margin-bottom: 1rem; }
.progress-bar {
  width: 100%; height: 12px; background: #334155; border-radius: 6px;
  margin: 1rem 0 0.5rem;
}
.progress-fill { height: 100%; background: #38bdf8; border-radius: 6px; transition: width 0.3s; }
.category-header {
  color: #38bdf8;
  margin: 1.5rem 0 0.5rem;
  text-transform: capitalize;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}
.lesson-list { margin: 0.5rem 0; }
.lesson-card {
  display: flex; align-items: center; justify-content: space-between;
  background: #1e293b; padding: 0.875rem 1rem; margin-bottom: 0.5rem;
  border-radius: 6px; border: 1px solid #334155;
}
.lesson-card a { text-decoration: none; flex: 1; }
.lesson-title { color: #f1f5f9; font-weight: 600; display: block; }
.lesson-desc { color: #94a3b8; font-size: 0.8125rem; }
.badge {
  font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 999px;
  font-weight: 600; white-space: nowrap; margin-left: 0.5rem;
}
.badge.done { background: #14532d; color: #4ade80; }
.badge.pending { background: #1e3a5f; color: #93c5fd; }

/* Lesson page */
.lesson-page { margin: 2rem 0; }
.breadcrumb a { color: #38bdf8; text-decoration: none; font-size: 0.875rem; }
.lesson-content {
  background: #1e293b; padding: 2rem; border-radius: 8px; border: 1px solid #334155;
  margin: 1.5rem 0;
}
.lesson-content h1 { font-size: 1.75rem; margin: 1.5rem 0 0.75rem; color: #f1f5f9; }
.lesson-content h2 { font-size: 1.375rem; margin: 1.25rem 0 0.5rem; }
.lesson-content h3 { font-size: 1.125rem; margin: 1rem 0 0.5rem; }
.lesson-content p { margin-bottom: 1rem; color: #cbd5e1; }
.lesson-content pre {
  background: #0f172a; padding: 1rem; border-radius: 6px; overflow-x: auto;
  margin-bottom: 1rem; border: 1px solid #334155;
}
.lesson-content code { font-family: "SF Mono", Menlo, monospace; font-size: 0.875rem; color: #7dd3fc; }
.lesson-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.lesson-content th, .lesson-content td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #334155; }
.lesson-content th { color: #38bdf8; font-weight: 600; }
.lesson-actions { text-align: center; margin: 1.5rem 0; }
.lesson-done { font-size: 1rem; padding: 0.5rem 1.25rem; }
