:root {
  --black: #0d0d0d;
  --panel: #1a1a1a;
  --gold: #c9a227;
  --gold-light: #e8c96a;
  --white: #f5f3ee;
  --gray: #9a958a;
  --line: #2e2b24;
  --radius: 14px;
  --danger: #c0392b;
  --success: #3fa15e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--gold-light); text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px 18px 60px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 600; }
.topbar .user-info { font-size: 0.85rem; color: var(--gray); display: flex; gap: 12px; align-items: center; }

.btn {
  display: inline-block; border: none; border-radius: 10px;
  padding: 11px 18px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; text-align: center;
}
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1400; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--white); }
.btn-danger { background: var(--danger); color: white; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}

.grid-courses {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px; margin-top: 20px;
}
.course-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.course-card .cover {
  height: 130px; background: linear-gradient(135deg, #2a2416, #1a1a1a);
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  font-size: 1.8rem;
}
.course-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { margin: 0; font-size: 1.05rem; }
.course-card p { margin: 0; color: var(--gray); font-size: 0.85rem; flex: 1; }
.price-tag { color: var(--gold-light); font-weight: 700; font-size: 1.05rem; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; color: var(--gray); margin-bottom: 5px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #111; color: var(--white); font-size: 0.95rem;
}
.form-group textarea { resize: vertical; min-height: 80px; }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.tab-btn {
  flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--gray); cursor: pointer; font-weight: 600;
}
.tab-btn.active { background: var(--gold); color: #1a1400; border-color: var(--gold); }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 14px; }
.alert-error { background: #3a1414; color: #ff8a80; border: 1px solid #5a1e1e; }
.alert-success { background: #123a1e; color: #7be49a; border: 1px solid #1e5a30; }

.lesson-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.lesson-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-size: 0.9rem;
}
.lesson-item.locked { opacity: 0.5; cursor: not-allowed; }
.lesson-item.active { border-color: var(--gold); background: #1f1a0f; }

.video-box {
  background: #000; border-radius: var(--radius); aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center; color: var(--gray);
  margin-bottom: 16px; overflow: hidden;
}
.video-box video { width: 100%; height: 100%; }

.quiz-question { margin-bottom: 22px; }
.quiz-question p.text { font-weight: 600; margin-bottom: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer;
}
.quiz-option.selected { border-color: var(--gold); background: #1f1a0f; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--gray); }
