/* ============================================================
   LearnHub — полный style.css
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ============ ПЕРЕМЕННЫЕ ТЕМЫ ============ */
:root {
  --bg: #0a0d14;
  --surface: #141922;
  --surface2: #1a212e;
  --border: #232b3a;
  --text: #e6e8ec;
  --muted: #8b94a7;
  --blue: #3d6bff;
  --blue2: #7aa2ff;
  --purple: #9333ea;
  --green: #22c55e;
  --red: #ef4444;
  --gold: #fbbf24;
}
[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface2: #f0f3f8;
  --border: #e1e6ef;
  --text: #1a1d24;
  --muted: #6b7280;
  --blue: #2563eb;
  --blue2: #3b82f6;
  --purple: #8b5cf6;
}

/* ============ БАЗА ============ */
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background .3s, color .3s;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(61,107,255,.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(147,51,234,.15), transparent 45%);
  animation: bgShift 25s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}
[data-theme="light"] body::before { opacity: .3; }
button { cursor: pointer; font: inherit; }

/* ============ АНИМАЦИИ ============ */
@keyframes bgShift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-40px, 30px) scale(1.15); opacity: .8; }
}
@keyframes pageEnter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pop {
  0% { transform: scale(.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
@keyframes achUnlock {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(251,191,36,.6); }
  100% { transform: scale(1); }
}
.page-enter { animation: pageEnter .45s cubic-bezier(.2,.7,.3,1); }

/* ============ КНОПКИ ============ */
.primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .15s, box-shadow .3s, filter .2s;
  position: relative;
  overflow: hidden;
}
.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(61,107,255,.45); filter: brightness(1.1); }
.primary:active { transform: scale(.97); }
.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25), transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s;
}
.primary:hover::after { transform: translateX(100%); }

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 8px;
  transition: all .2s;
}
.ghost:hover { background: var(--surface2); border-color: var(--blue); transform: translateY(-1px); }

.danger {
  background: #7f1d1d;
  color: white;
  border: 1px solid #b91c1c;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.danger:hover { background: #b91c1c; }

/* ============ ВЕРХНЯЯ ПАНЕЛЬ ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(20, 25, 34, .75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideIn .4s;
}
[data-theme="light"] .topbar { background: rgba(255,255,255,.8); }

.brand {
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, var(--blue2), #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  transition: transform .2s;
}
.brand:hover { transform: scale(1.05); }

.user { display: flex; gap: 10px; align-items: center; color: var(--muted); flex-wrap: wrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px;
}
.streak-badge {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: rgba(251,191,36,.15);
  color: var(--gold); border-radius: 20px;
  font-size: 13px; font-weight: 600;
}

/* ============ РАЗМЕТКА ============ */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
h2 {
  font-size: 26px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text), var(--muted));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h3 { margin-bottom: 12px; }
.muted { color: var(--muted); }

/* ============ ХЛЕБНЫЕ КРОШКИ ============ */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  margin-bottom: 16px; flex-wrap: wrap;
}
.crumb { color: var(--blue2); cursor: pointer; text-decoration: none; transition: color .2s; }
.crumb:hover { color: var(--text); }
.crumb.active { color: var(--muted); cursor: default; }
.crumb-sep { color: var(--border); }

/* ============ АВТОРИЗАЦИЯ ============ */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
  animation: fadeIn .5s;
}
.auth-card {
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  backdrop-filter: blur(20px);
  padding: 36px; border-radius: 20px;
  border: 1px solid var(--border);
  width: 100%; max-width: 420px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 60px rgba(61,107,255,.1);
  animation: pop .6s cubic-bezier(.2,.7,.3,1);
}
.auth-card h1 {
  font-size: 32px; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--blue2), #c084fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tabs { display: flex; gap: 8px; margin: 24px 0; }
.tab {
  flex: 1; background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); padding: 10px; border-radius: 10px;
  transition: all .25s;
}
.tab:hover { border-color: var(--blue); }
.tab.active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white; border-color: transparent;
  box-shadow: 0 8px 25px rgba(61,107,255,.4);
}
#authForm { display: flex; flex-direction: column; gap: 12px; }
#authForm input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: 10px; font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
#authForm input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(61,107,255,.15);
}
.error { color: #ff6b6b; font-size: 14px; min-height: 18px; }
.success { color: var(--green); font-size: 14px; }

/* ============ ПОКАЗАТЬ/СКРЫТЬ ПАРОЛЬ ============ */
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 48px; }
.toggle-password {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none; color: var(--muted);
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s;
}
.toggle-password:hover { background: var(--surface2); color: var(--blue2); }
.toggle-password svg { display: block; }

/* ============ ПОИСК ============ */
.search-wrap { margin-bottom: 20px; }
.search-input {
  width: 100%; padding: 12px 18px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 12px; font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(61,107,255,.15);
}

/* ============ КАРТОЧКИ КУРСОВ ============ */
.courses {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.course-card {
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .25s, box-shadow .3s;
  position: relative; overflow: hidden;
  animation: pageEnter .5s backwards;
}
.course-card:hover { transform: translateY(-6px) scale(1.02); border-color: var(--blue); box-shadow: 0 20px 50px rgba(61,107,255,.25); }
.course-cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.course-card h3 { font-size: 18px; margin-bottom: 8px; }
.course-card p.muted { font-size: 13px; min-height: 36px; }
.progress {
  height: 6px; background: rgba(255,255,255,.05);
  border-radius: 3px; overflow: hidden;
  margin-top: 14px; position: relative;
}
.bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  position: relative; overflow: hidden;
  transition: width .8s cubic-bezier(.2,.7,.3,1);
}
.bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 2.2s infinite;
}
.meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============ СПИСОК УРОКОВ ============ */
.lessons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.lesson {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; cursor: pointer;
  transition: all .25s;
  animation: pageEnter .4s backwards;
}
.lesson:hover { border-color: var(--blue); transform: translateX(6px); background: var(--surface2); }
.lesson.done { border-color: rgba(34,197,94,.4); }
.lesson .num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); display: grid; place-items: center;
  font-size: 13px; color: var(--muted); flex-shrink: 0;
}
.lesson.done .num { background: rgba(34,197,94,.15); color: var(--green); }
.lesson .title { flex: 1; }
.badge { font-size: 12px; color: var(--muted); padding: 4px 10px; background: var(--bg); border-radius: 20px; }
.lesson.done .badge { color: var(--green); background: rgba(34,197,94,.1); }

/* ============ УРОК ============ */
.lesson-view .section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 12px;
  animation: pageEnter .4s backwards;
}
.section h4 { color: var(--blue2); margin-bottom: 10px; font-size: 15px; }
.section ul { margin: 0; padding-left: 20px; }
.section pre {
  background: var(--bg); padding: 14px; border-radius: 10px;
  overflow-x: auto; border: 1px solid var(--border);
}
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; color: var(--blue2); }

/* ============ ТЕСТ ============ */
.quiz { margin-top: 24px; animation: pageEnter .5s backwards; }
.question {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin-bottom: 12px;
}
.option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  transition: all .2s;
}
.option:hover { background: var(--surface2); transform: translateX(4px); }
.option input { accent-color: var(--blue); }

/* ============ FLASHCARDS ============ */
.flashcard-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-top: 20px; }
.flashcard-counter { color: var(--muted); font-size: 14px; }
.flashcard {
  width: 100%; max-width: 480px; height: 280px;
  perspective: 1200px; cursor: pointer;
  animation: pop .4s;
}
.flashcard-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; place-items: center;
  border-radius: 20px; padding: 24px; text-align: center;
  font-size: 32px; font-weight: 700;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.flashcard-front { background: linear-gradient(160deg, var(--surface), var(--surface2)); color: var(--text); }
.flashcard-back {
  background: linear-gradient(160deg, rgba(61,107,255,.25), rgba(147,51,234,.25));
  transform: rotateY(180deg); color: var(--text);
}
.flashcard-hint { font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 12px; }
.flashcard-actions { display: flex; gap: 12px; }
.flashcard-actions button { padding: 12px 26px; font-size: 15px; }
.btn-know {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white; border: none; border-radius: 10px; font-weight: 600;
  transition: all .2s;
}
.btn-know:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(34,197,94,.4); }
.btn-dont {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white; border: none; border-radius: 10px; font-weight: 600;
  transition: all .2s;
}
.btn-dont:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(239,68,68,.4); }

/* ============ НАВИГАЦИЯ УРОКОВ ============ */
.lesson-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============ УВЕДОМЛЕНИЯ ============ */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface2); padding: 14px 20px;
  border-radius: 12px; border-left: 4px solid var(--blue);
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
  animation: toastIn .35s cubic-bezier(.2,.7,.3,1), toastOut .35s 3s forwards;
  max-width: 340px;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.gold {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, var(--surface2), rgba(251,191,36,.1));
}

/* ============ ПРОФИЛЬ ============ */
.profile-header {
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 28px; padding: 24px;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border); border-radius: 16px;
}
.avatar-lg {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 32px;
  box-shadow: 0 10px 30px rgba(61,107,255,.3);
}

/* ============ ДОСТИЖЕНИЯ ============ */
.achievements-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-top: 16px;
}
.achievement {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
  transition: transform .2s, box-shadow .2s;
}
.achievement.unlocked {
  border-color: var(--gold);
  background: linear-gradient(160deg, var(--surface), rgba(251,191,36,.08));
  animation: achUnlock .8s;
}
.achievement.locked { opacity: .5; filter: grayscale(1); }
.achievement:hover { transform: translateY(-3px); }
.ach-title { font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.ach-desc { font-size: 13px; color: var(--muted); }

/* ============ АДМИНКА ============ */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tab {
  padding: 10px 20px; border-radius: 10px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); transition: all .2s;
}
.admin-tab:hover { border-color: var(--blue); color: var(--text); }
.admin-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white; border-color: transparent;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border); border-radius: 16px; padding: 22px;
  transition: transform .25s, box-shadow .25s;
  animation: pop .4s backwards;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(61,107,255,.2); }
.stat-card .value {
  font-size: 36px; font-weight: 800;
  background: linear-gradient(135deg, var(--blue2), #c084fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-card .label {
  color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .5px;
}

.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border-radius: 12px; overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--surface2); color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.admin-table tr:hover td { background: var(--surface2); }

.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px; margin-bottom: 20px;
}
.form-card input, .form-card select, .form-card textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: 8px;
  font: inherit; margin-bottom: 10px; transition: border-color .2s;
}
.form-card input:focus, .form-card textarea:focus, .form-card select:focus {
  outline: none; border-color: var(--blue);
}
.form-card label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 60px; padding-top: 30px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-links {
  display: flex; gap: 20px; flex-wrap: wrap;
  justify-content: center; font-size: 13px;
}
.footer-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--blue2); }

/* ============ КОММЕНТАРИИ ============ */
.comments-section {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.comment-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 10px; animation: pageEnter .3s;
}
.comment-meta {
  display: flex; justify-content: space-between;
  margin-bottom: 8px; font-size: 13px;
}
.comment-meta b { color: var(--blue2); }
.comment-meta span { color: var(--muted); }

/* ============ НАСТРОЙКИ ============ */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  animation: pageEnter .4s backwards;
}
.settings-card h3 {
  margin-bottom: 8px;
  color: var(--blue2);
}
.settings-links {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.settings-links li {
  margin-bottom: 8px;
}
.settings-links a {
  color: var(--blue2);
  text-decoration: none;
  transition: color .2s;
}
.settings-links a:hover { color: var(--text); }

.settings-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .2s;
}
.settings-search-item:hover { background: var(--border); }
.settings-search-item b { color: var(--text); }
.settings-search-item .muted { font-size: 12px; }

/* ============ АДАПТИВНОСТЬ ============ */
@media (max-width: 640px) {
  .container { padding: 16px; }
  .topbar { padding: 12px 16px; }
  h2 { font-size: 22px; }
  .flashcard-front, .flashcard-back { font-size: 24px; }
  .flashcard { height: 240px; }
  .profile-header { flex-direction: column; text-align: center; }
  .footer-links { flex-direction: column; gap: 10px; }
/* ============ ПРОИЗНОШЕНИЕ / ОЗВУЧКА ============ */
.speak-btn {
  background: rgba(61,107,255,.15); border: 1px solid var(--blue); color: var(--blue2);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px;
  transition: all .2s; vertical-align: middle; margin-left: 6px;
}
.speak-btn:hover { background: var(--blue); color: white; transform: scale(1.1); }
.pronunciation-task { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.pronunciation-phrase { font-size: 20px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pronunciation-actions { display: flex; flex-direction: column; gap: 8px; }
.pron-btn { padding: 10px 20px; font-size: 15px; }
.pronunciation-result { padding: 10px; border-radius: 8px; font-size: 14px; background: var(--surface); }
.pronunciation-result.ok { color: var(--green); border: 1px solid rgba(34,197,94,.4); }
.pronunciation-result.err { color: var(--red); border: 1px solid rgba(239,68,68,.4); }

/* ============ PLAYGROUND ============ */
.playground { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 24px; }
.playground h3 { color: var(--blue2); margin-bottom: 12px; }
.playground-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.playground-toolbar select { padding: 8px 14px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font: inherit; cursor: pointer; }
.code-editor { width: 100%; min-height: 220px; padding: 14px; background: #0b1018; color: #b8e0ff; border: 1px solid var(--border); border-radius: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.5; resize: vertical; tab-size: 4; }
[data-theme="light"] .code-editor { background: #f8fafc; color: #1e293b; }
.code-editor:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(61,107,255,.15); }
.playground-output { margin-top: 12px; background: #050810; border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 60px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; color: #e6e8ec; }
[data-theme="light"] .playground-output { background: #1e293b; color: #e2e8f0; }
.out-stdout { color: #4ade80; }
.out-stderr { color: #fbbf24; }
.out-error { color: #ff6b6b; }

/* ============ НАСТРОЙКИ ============ */
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.settings-card h3 { margin-bottom: 8px; color: var(--blue2); }
.settings-links { list-style: none; padding: 0; margin: 10px 0 0; }
.settings-links li { margin-bottom: 8px; }
.settings-links a { color: var(--blue2); text-decoration: none; }
.settings-links a:hover { color: var(--text); }
.settings-search-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface2); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.settings-search-item:hover { background: var(--border); }
.settings-search-item b { color: var(--text); }
.settings-search-item .muted { font-size: 12px; }

/* ============ FOOTER ============ */
.site-footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); text-align: center; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--blue2); }

/* ============ КОММЕНТАРИИ ============ */
.comments-section { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.comment-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.comment-meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.comment-meta b { color: var(--blue2); }
.comment-meta span { color: var(--muted); }

/* ============ АНИМАЦИИ ============ */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(61,107,255,.4); } 50% { box-shadow: 0 0 0 12px rgba(61,107,255,0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); } 20%, 40%, 60%, 80% { transform: translateX(3px); } }
@keyframes zoomIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.course-card:hover { animation: float 2s ease-in-out infinite; }
.primary:active { animation: shake .3s; }
.stat-card { animation: zoomIn .4s backwards; }
}