* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Phetsarath OT', 'Noto Sans Lao', Tahoma, Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.8;
}
header {
  background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
  padding: 40px 20px;
  text-align: center;
}
header h1 { font-size: 2rem; margin-bottom: 10px; }
header p { color: #dbeafe; }
main { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
main h2 { margin-bottom: 20px; color: #7dd3fc; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: #1e293b;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: #e2e8f0;
  border: 1px solid #334155;
  transition: transform .15s, border-color .15s;
  display: block;
}
.card:hover { transform: translateY(-4px); border-color: #38bdf8; }
.card .num {
  display: inline-block;
  background: #0ea5e9;
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .8rem;
  margin-bottom: 8px;
}
.card h3 { margin-bottom: 6px; color: #bae6fd; }
.card p { font-size: .9rem; color: #94a3b8; }
footer { text-align: center; padding: 30px; color: #64748b; font-size: .9rem; }

/* Level pages */
.lesson {
  background: #1e293b;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid #334155;
}
.lesson h3 { color: #38bdf8; margin-bottom: 10px; }
.lesson h4 { color: #fbbf24; margin: 14px 0 6px; }
pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  color: #a5f3fc;
  font-family: Consolas, monospace;
  font-size: .9rem;
  margin: 10px 0;
}
code { background: #334155; padding: 2px 6px; border-radius: 4px; color: #fde68a; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th, td { border: 1px solid #334155; padding: 8px 12px; text-align: left; }
th { background: #0f172a; color: #7dd3fc; }
.back { display: inline-block; margin-bottom: 16px; color: #38bdf8; text-decoration: none; }
details { background: #0f172a; border-radius: 8px; padding: 10px 14px; margin: 8px 0; border: 1px solid #334155; }
summary { cursor: pointer; color: #fbbf24; font-weight: bold; }
ul, ol { margin-left: 24px; }
.diagram { white-space: pre; font-family: Consolas, monospace; color: #86efac; background:#0f172a; padding:14px; border-radius:8px; overflow-x:auto; }
