/* ===== Загальні стилі для всіх сторінок ===== */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  overflow-x: hidden;
}

/* Центрування форм на login/password без скролу */
body.centered {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
/* ===== Для сторінок з контентом (наприклад, home.html) ===== */
body.scrollable {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
}

.form-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  background: var(--bs-body-bg);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

/* Якщо екран дуже низький (менше 600px по висоті) — робимо auto-scroll */
@media (max-height: 600px) {
  body.centered {
    align-items: flex-start;
    overflow-y: auto;
    padding: 1rem 0;
  }
}

[data-bs-theme="dark"] body {
  background-color: #121212;
  color: #fff;
}
[data-bs-theme="dark"] .form-container {
  background: #1e1e1e;
  color: #fff;
}

/* ===== Анімований фон (canvas) ===== */
canvas#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Фон сторінки (світла тема) ===== */
body[data-bs-theme="light"].scrollable,
body[data-bs-theme="light"].centered {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  transition: background 0.3s ease;
}

/* ===== Фон сторінки (темна тема) ===== */
body[data-bs-theme="dark"].scrollable,
body[data-bs-theme="dark"].centered {
  background: rgba(10, 10, 10, 0.9);
  color: #fff;
  transition: background 0.3s ease;
}


.theme-toggle {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
}
.theme-toggle .material-icons {
  font-size: 22px; line-height: 1;
}

.lang-switch {
  text-align: center;
  margin-top: 1rem;
}
.lang-switch a {
  margin: 0 0.5rem;
  text-decoration: none;
  font-weight: bold;
}

/* ====== СТИЛІ ДЛЯ HOME.HTML ====== */
.header-time {
  text-align: center;
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.task-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
}

.task-filters .btn {
  border-radius: 20px;
}

 /* ===== Список завдань ===== */
    .task-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-top: 1rem;
    }

    .task-item {
      background: var(--bs-body-bg);
      border-radius: 16px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
      padding: 1rem 1.2rem;
      transition: transform 0.2s ease, box-shadow 0.3s ease;
      border-left: 5px solid var(--goal-color, #0d6efd);
    }
    .task-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    }

    .task-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .task-title {
      font-weight: 600;
      font-size: 1.1rem;
    }

    .task-dates {
      font-size: 0.85rem;
      color: var(--bs-secondary-color);
    }

    .task-desc {
      font-size: 0.9rem;
      margin: 6px 0 10px;
    }

    .subtasks {
      font-size: 0.85rem;
      padding-left: 1.2rem;
      margin-bottom: 6px;
    }

    .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .tag {
      font-size: 0.75rem;
      background: rgba(13,110,253,0.1);
      color: var(--bs-primary);
      border-radius: 20px;
      padding: 3px 8px;
    }
    [data-bs-theme="dark"] .tag {
      background: rgba(13,110,253,0.2);
    }

    .priority {
      font-weight: 600;
      font-size: 0.85rem;
    }

    .goal {
      display: inline-block;
      font-size: 0.8rem;
      color: #fff;
      border-radius: 10px;
      padding: 2px 8px;
      font-weight: 500;
      margin-top: 6px;
    }

/* ====== Мобільне нижнє меню ====== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  z-index: 10;
}

.bottom-nav a {
  color: var(--bs-body-color);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
}

.bottom-nav .material-icons {
  font-size: 22px;
}

/* Приховати меню на ПК */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
}
