/* assets/css/style.css — чистая, mobile-first версия */

/* Основные переменные */
:root {
  --bg: #f7fafc;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #3b82f6;
  --success: #10b981;
  --purple: #7c3aed;
  --radius: 14px;
  --max-width: 1100px;
  --gap: 16px;
  font-size: 16px;
}

/* Базовые стили */
* { box-sizing: border-box; }
html, body { height: 100%; }

body.nisprep-body {
  margin: 0;
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px;
}

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 40;
  border-bottom: 1px solid #e6edf3;
  padding: 10px 8px;
  border-radius: 0 0 12px 12px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-weight: 600;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
}

/* Меню */
.nav-main {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-link {
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-link:hover {
  background: rgba(59,130,246,0.1);
  color: var(--accent);
}

/* Контент */
.main-content {
  padding: 12px 0;
}

/* Карточки */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: var(--gap);
  box-shadow: 0 1px 3px rgba(2,6,23,0.04);
}
.card-title {
  font-weight: 600;
  margin-bottom: 8px;
}
.card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Прогресс */
.progress-indicator {
  flex: 1;
  background: #eef2f6;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 30%;
}

/* Список уроков */
.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lesson-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  background: #fff;
}
.lesson-item.locked { opacity: 0.6; }

/* Кнопки */
.btn {
  display: inline-block;
  padding: 10px 12px;
  margin: 5px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-ghost { background: #f3f4f6; color: #111; }

.btn.disabled,
.btn.disabled:hover,
.btn.disabled:active {
  opacity: 0.5;
  pointer-events: none;
}

/* Кнопки внутри карточек */
/* --- Исправленные кнопки внутри карточек --- */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 12px;
}

.card-actions .btn {
  display: inline-block;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* На мобильных — кнопки в столбик с зазором */
@media (max-width: 768px) {
  .card-actions {
    flex-direction: column;
    gap: 12px;
  }

  .card-actions .btn {
    width: 100%;
    text-align: center;
  }
}


/* Подвал */
.site-footer {
  margin-top: 18px;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* Фокус */
a:focus, button:focus {
  outline: 3px solid rgba(59,130,246,0.18);
  outline-offset: 2px;
}

/* Десктоп */
@media (min-width: 900px) {
  .header-inner { padding: 8px 0; }
  .lessons-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .lesson-item {
    width: calc(50% - 10px);
  }
}


/* === Duolingo-style base theme === */

/* Цветовая палитра и общий фон */
:root {
  --bg: #e9f7ef;
  --card: #ffffff;
  --accent: #58CC02;
  --success: #58CC02;
  --purple: #A435F0;
  --muted: #6b7280;
  --radius: 18px;
  --shadow: 0 3px 8px rgba(0,0,0,0.06);
}

/* Основное тело */
body.nisprep-body {
  background: var(--bg);
  color: #2d3436;
  font-family: "Nunito", Inter, system-ui, sans-serif;
  line-height: 1.6;
}

/* Заголовки и текст */
h1, h2, h3, h4 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  color: #2d3436;
}
p {
  color: #374151;
}

/* Карточки и панели */
.card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

/* Кнопки */
.btn {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover {
  transform: scale(1.02);
}
.btn-primary { background: #1CB0F6; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-purple  { background: var(--purple); color: #fff; }
.btn-ghost   { background: #f1f3f4; color: #333; }
.btn-secondary { background: #FFD43B; color: #111; }

/* Меню и шапка */
.site-header {
  background: #fff;
  border-bottom: 2px solid #E5F6E5;
  box-shadow: var(--shadow);
}
.nav-link {
  font-weight: 600;
  color: #333;
}
.nav-link:hover {
  color: var(--accent);
  background: rgba(88,204,2,0.1);
}

/* Прогресс бары */
.progress-indicator {
  background: #e3f3e3;
}
.progress-bar {
  background: var(--accent);
}

/* Футер */
.site-footer {
  background: #f8faf8;
  border-top: 2px solid #e6f7e6;
  font-weight: 500;
  color: #6b7280;
}

/* Формы и поля */
input, select, textarea {
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,204,2,0.2);
  outline: none;
}

* { box-sizing: border-box; }
body { overflow-x: hidden; }

.lessons-list { overflow-x: hidden; }
#chartWrap, #weekChart { max-width: 100%; width: 100%; }
.progress-bar-inner { max-width: 100%; }