* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ===== ЦВЕТОВЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
  --bg-color: #F5DEB3;             /* Пшеничный фон (светлая тема) */
  --text-color: #808080;           /* Серый текст */
  --accent-color: #A0522D;         /* Шоколадный акцент */
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-hover: rgba(255, 255, 255, 0.3);
  --border-color: rgba(255, 255, 255, 0.5);
  --task-bg: rgba(255, 255, 255, 0.5);
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ===== ТЁМНАЯ ТЕМА ===== */
[data-theme="dark"] {
  --bg-color: #111827;             /* Тёмно-синий фон */
  --text-color: #d1d5db;           /* Светло-серый текст */
  --accent-color: #ec4899;         /* Розовый акцент */
  --card-bg: rgba(31, 41, 55, 0.95);
  --card-hover: rgba(55, 65, 81, 0.8);
  --border-color: rgba(75, 85, 99, 0.5);
  --task-bg: rgba(55, 65, 81, 0.5);
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ===== ОБЩИЕ СТИЛИ ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Заголовок страницы */
.page-header {
  padding: 20px;
  text-align: center;
  background: var(--card-bg);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin: 0;
  font-weight: 600;
}

/* Аккордеон лекций */
.lecture-accordion {
  padding: 0 20px;
}

.lecture-item {
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 2px 8px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.lecture-header {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--text-color);
  font-weight: 600;
  transition: background 0.3s ease;
}

.lecture-header:hover {
  background: var(--card-hover);
}

.lecture-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
  background: rgba(236, 72, 153, 0.1); /* Светло-розовый bg для тёмной темы */
  padding: 4px 10px;
  border-radius: 10px;
  min-width: 55px;
  text-align: center;
}

.lecture-header .material-icons {
  margin-left: auto;
  transition: transform 0.3s ease;
  color: var(--text-color);
}

.lecture-item.active .lecture-header .material-icons {
  transform: rotate(180deg);
}

.lecture-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 20px;
  background: var(--task-bg);
  color: var(--text-color);
}

.lecture-item.active .lecture-body {
  max-height: 1000px;
  padding: 0 20px 20px;
}

.lecture-body h4 {
  margin: 16px 0 8px 0;
  color: var(--accent-color);
  font-weight: 600;
}

.lecture-body ul, .lecture-body ol {
  margin: 12px 0;
  padding-left: 20px;
}

.lecture-body li {
  margin-bottom: 8px;
}

/* Карточка задания */
.task-card {
  background: var(--task-bg);
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  border-left: 4px solid var(--accent-color);
}

.task-card h4 {
  color: var(--accent-color);
  margin: 0 0 12px 0;
  font-weight: 600;
}

/* FAB-меню */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

.fab-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow-color);
  color: var(--text-color);
  transition: transform 0.2s ease;
}

.fab-main:hover {
  transform: scale(1.1);
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  position: absolute;
  bottom: 80px;
  right: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.fab-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  z-index: 1;
}

.fab-item {
  background: var(--card-bg);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.2s ease;
}

.fab-item:hover {
  transform: scale(1.1);
}

.fab-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Кнопка темы */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow-color);
  z-index: 1000;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.theme-toggle .material-icons {
  font-size: 1.5rem;
}