* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  background: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}
header {
  background: #020617;
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: #38bdf8;
}
.nav a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 1.2rem;
  font-size: 0.95rem;
  transition: 0.2s;
}
.nav a:hover {
  color: #38bdf8;
}
.lang-switch {
  cursor: pointer;
  margin-right: 0.5rem;
  font-size: 1.1rem;
}
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.btn {
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: #020617;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.45);
}
.btn-secondary {
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  border: 1px solid #4b5563;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.95rem;
  transition: 0.15s ease;
}
.btn-secondary:hover {
  background: #1e293b;
}
.card {
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 500px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}
input {
  width: 100%;
  padding: 0.7rem;
  margin-top: 0.4rem;
  border-radius: 0.6rem;
  border: 1px solid #374151;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 0.95rem;
}
input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 1px #38bdf8;
}
.tooltip {
  background: #1e293b;
  border-left: 4px solid #38bdf8;
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.lesson-tile {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.lesson-tile:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
}
.lesson-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.lesson-title {
  font-size: 1rem;
  color: #e5e7eb;
}
.xp-bar {
  margin-top: 1rem;
  background: #1e293b;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  width: 0%;
  transition: width 0.4s ease;
}
.lesson-container {
  background: #020617;
  border: 1px solid #1f2937;
  padding: 2rem;
  border-radius: 1rem;
  margin-top: 2rem;
}
.lesson-section {
  margin-bottom: 2rem;
}
.code-box {
  background: #0f172a;
  border: 1px solid #1f2937;
  padding: 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.quiz-option {
  background: #1e293b;
  padding: 0.8rem;
  border-radius: 0.6rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: 0.2s;
}
.quiz-option:hover {
  background: #334155;
}
.quiz-option.correct {
  background: #22c55e;
}
.quiz-option.wrong {
  background: #ef4444;
}
footer {
  background: #020617;
  border-top: 1px solid #1f2937;
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 3rem;
}
.lesson-tile {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.lesson-tile:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}
:root {
  --bg: #0f172a;
  --text: #e5e7eb;
  --card: #020617;
  --border: #1f2937;
}
.light {
  --bg: #f8fafc;
  --text: #0f172a;
  --card: #ffffff;
  --border: #cbd5e1;
}
body {
  background: var(--bg);
  color: var(--text);
}
.card, .lesson-container, .lesson-tile {
  background: var(--card);
  border-color: var(--border);
}
.achievement {
  background: #1e293b;
  padding: 1rem;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
  border-left: 4px solid #38bdf8;
}
.achievement.unlocked {
  border-left-color: #22c55e;
  background: #0f3a1e;
}
