/* =============== Базовые стили =============== */
/* Добавьте это в самое начало ваших стилей */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Занимает как минимум всю высоту viewport */
}

/* Основной контент (все секции кроме футера) */
.container,
.hero,
.how-it-works,
.benefits,
.auth-page,
.profile-container,
.edit-profile-form,
.task-list,
.info-container,
.family-container {
  flex: 1 0 auto; /* Растягивается, заполняя доступное пространство */
}

/* Футер */
footer {
  flex-shrink: 0; /* Не сжимается */
  margin-top: auto; /* Прижимается вниз */
}

:root {
  /* Основные цвета как в профиле */
  --primary: #4CAF50;       /* Зеленый */
  --primary-light: #C8E6C9;  /* Светло-зеленый */
  --primary-dark: #388E3C;   /* Темно-зеленый */
  --accent: #FFC107;        /* Желтый */
  --text: #212121;          /* Основной текст */
  --text-secondary: #757575; /* Вторичный текст */
  --divider: #BDBDBD;       /* Разделители */
  --bg: #FFFFFF;            /* Фон */
  --card-bg: #FAFAFA;       /* Фон карточек */
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;

}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============== Навигация =============== */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.nav-links a:hover {
    color: #4CAF50;
}

/*.btn-small {
    background-color: #4CAF50;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease;
}

.btn-small:hover {
    background-color: #43a047;
}*/

/* =============== Hero =============== */
.hero {
    background: #e8f5e9;
    padding: 80px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: #555;
    margin-bottom: 30px;
}

.hero .btn {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.hero .btn:hover {
    background-color: #43a047;
}

/* =============== "Как работает" =============== */
.how-it-works {
    background: #fff;
    padding: 60px 20px;
}

.how-it-works h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #333;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    background: #f4f4f4;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step h4 {
    color: #4CAF50;
    font-size: 18px;
    margin-bottom: 10px;
}

.step p {
    color: #555;
    font-size: 16px;
}

/* =============== Футер =============== */
footer {
    background-color: #2c2c2c;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
}

footer nav {
    margin-top: 10px;
}

footer nav a {
    color: #bbb;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer nav a:hover {
    color: #fff;
}


.benefits {
    background-color: #ffffff;
    padding: 60px 20px;
    text-align: center;
}

.benefits h3 {
    font-size: 28px;
    margin-bottom: 40px;
    color: #333;
}

.benefit-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
}

.benefit-item {
    background: #f4f4f4;
    border-radius: 12px;
    padding: 20px;
    max-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-item .emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.benefit-item p {
    font-size: 16px;
    color: #555;
    margin: 0;
}



/* =============== Страница входа =============== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #f9f9f9;
    padding: 40px 20px;
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

.auth-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.auth-box input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.auth-box button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-box button:hover {
    background-color: #43a047;
}

.auth-box .register {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.auth-box .register a {
    color: #007BFF;
    text-decoration: none;
}

.auth-box .register a:hover {
    text-decoration: underline;
}

.auth-box .remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
    line-height: 1
}

.auth-box .remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}
.auth-box .remember-me label {
    position: relative;
    top: 1px; /* можно регулировать: 1–2px обычно достаточно */
}

.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.flash.success {
    background-color: #e6f4ea;
    color: #2e7d32;
    border-left: 5px solid #4CAF50;
}

.flash.error {
    background-color: #fdecea;
    color: #c62828;
    border-left: 5px solid #e53935;
}

.flash.warning {
    background-color: #fff8e1;
    color: #f57c00;
    border-left: 5px solid #ffb300;
}

.flash.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 5px solid #2196F3;
}


.profile-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.profile-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4CAF50;
}

.profile-info h2 {
  font-size: 28px;
  margin-bottom: 6px;
  color: #333;
}

.profile-email {
  color: #666;
  font-size: 16px;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  margin: 30px 0;
}

.stat-item {
  text-align: center;
}

.stat-icon {
  font-size: 36px;
  margin-bottom: 8px;
  color: #4CAF50;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #222;
}

.stat-label {
  font-size: 14px;
  color: #777;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.btn-primary {
  background-color: #4CAF50;
  color: white;
}

.btn-primary:hover {
  background-color: #43a047;
}

.btn-secondary {
  background-color: #eee;
  color: #333;
  border: 1px solid #ccc;
}

.btn-secondary:hover {
  background-color: #ddd;
}

.btn-logout {
  background-color: #e74c3c;
  color: white;
}

.btn-logout:hover {
  background-color: #c0392b;
}


.edit-profile-form {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.edit-profile-form label {
    display: block;
    margin: 15px 0 5px;
    font-weight: 500;
}

.edit-profile-form input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.edit-profile-form button {
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
}

.edit-profile-form button:hover {
    background-color: #43a047;
}

.page-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: #333;
}























.create-family-form {
    max-width: 400px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.create-family-form label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.create-family-form input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.create-family-form .btn {
    width: 100%;
}

.create-family-form select {
    padding: 10px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
}



--- ---------------------------


 Контейнер всей страницы

.task-list {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}



.task-list h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}






.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
    transition: all 0.2s ease;
    margin: 10px auto;
    max-width: 600px;   }

.task-item:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
}



.task-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.task-left input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 15px;
    cursor: pointer;
}




.task-name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}



.task-points input[type="number"] {
    width: 60px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;

}

.task-points input[type="number"]::-webkit-outer-spin-button,
.task-points input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}


.submit-btn {
    display: block;
    margin: 25px auto 0;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    min-width: 200px;
}

.submit-btn:hover {
    background-color: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}




.info-container h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

/* === Контейнер всей страницы === */
.info-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* === Общая карточка (обертка для текста) === */
.info-card {
    background-color: #fefefe;
    border: 1px solid #e0e0e0;
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;

}

/* === Приветственный блок === */
.welcome-card {
    background-color: #e8f5e9;
    border-left: 6px solid #4CAF50;
}

.welcome-line {
    font-size: 27px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2e7d32;
    line-height: 1.5;
}

.welcome-line .highlight {
    font-size: inherit;
    font-weight: bold;
}

/* === Заголовки и параграфы === */
.section-title {
    font-size: 22px;
    margin-bottom: 14px;
    color: #333;
    font-weight: 600;
}

.info-card p {
    color: #444;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* === Список правил системы баллов === */
.points-rules {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.points-rules li {
    font-size: 15px;
    padding: 8px 0;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === Блок ссылок внизу === */
.footer-links {
    background-color: #f9f9f9;
    border-top: 1px dashed #ccc;
    text-align: center;
    padding: 16px 20px;
    margin-top: 30px;
}

.footer-links a {
    color: #2196F3;
    font-weight: 500;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #1565c0;
}

/* === Иконки в тексте (опционально, если хочешь их стилизовать отдельно) === */
.task-icon, .emoji {
    font-size: 18px;
    margin-right: 4px;
    vertical-align: middle;
}







-------------------------!!!!!!!!!!!!!!-------
/* 🌐 Общий контейнер */
.profile-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  font-family: 'Segoe UI', sans-serif;
  color: #333;
}

/* 🧑‍💼 Шапка профиля */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 20px;
}

.profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4CAF50;
}

.profile-info h2 {
  font-size: 24px;
  margin: 0;
}

.profile-email {
  font-size: 14px;
  color: #777;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-btn {
  background-color: #4CAF50;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  transition: background 0.2s ease;
}

.profile-btn:hover {
  background-color: #43a047;
}

.profile-btn.logout {
  background-color: #e53935;
}

.profile-btn.logout:hover {
  background-color: #c62828;
}

/* 📊 Блок баллов */
.profile-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.score-card {
  background: #f1f8e9;
  padding: 15px;
  text-align: center;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.score-card span {
  display: block;
  font-size: 22px;
  font-weight: bold;
  margin: 8px 0;
  color: #2e7d32;
}

.score-card small {
  color: #555;
}

/* 📦 Общий стиль карточек */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* 📈 Статистика */
.stats-summary ul {
  padding-left: 20px;
  margin-top: 15px;
}

.stats-summary li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* 🔥 Топ задач */
.top-tasks ol {
  margin-top: 15px;
  padding-left: 20px;
}

.top-tasks li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* 🗓 Активность */
.week-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.day-cell {
  flex: 1;
  text-align: center;
  font-size: 18px;
  padding: 10px 0;
}

/* 🧾 История задач */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
}

.filter-form label {
  font-size: 14px;
  color: #333;
}

.filter-form input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.filter-form button {
  padding: 8px 14px;
  font-size: 14px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-form button:hover {
  background-color: #1976D2;
}

/* 📋 Таблица истории */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table thead {
  background: #e0e0e0;
}

.history-table th,
.history-table td {
  padding: 10px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #ddd;
}

.history-table tr:hover {
  background-color: #f9f9f9;
}

.dev-note {
  margin-top: 10px;
  font-size: 14px;
  color: #888;
  text-align: right;
  font-style: italic;
}
















.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  font-size: 0.95rem;
}

.history-table thead {
  background: #f0f4f8;
  color: #333;
}

.history-table th, .history-table td {
  padding: 12px 16px;
  text-align: left;
}

.history-table tbody tr:nth-child(odd) {
  background: #f9fbfc;
}

.history-table tbody tr:hover {
  background: #eef6ff;
}

.history-table .plus {
  color: green;
  font-weight: bold;
}

.history-table .minus {
  color: crimson;
  font-weight: bold;
}

.edited {
  color: green;
  font-weight: 600;
}

.not-edited {
  color: #999;
}



































.family-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1.5rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100 %;
}

/* Баннер семьи */
.family-banner {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
  position: relative;
  overflow: hidden;
}

.family-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.family-banner h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.family-banner p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Статистика */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--primary);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.stat-primary::before { background: var(--primary); }
.stat-secondary::before { background: var(--accent); }
.stat-accent::before { background: var(--primary-dark); }

.stat-card p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.stat-card strong {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-top: 0.5rem;
}

.stat-progress {
  height: 6px;
  background: #edf2f7;
  border-radius: 3px;
  margin: 1rem 0;
  overflow: hidden;
}

.stat-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--primary);
  border-radius: 3px;
}

.stat-secondary .stat-progress::after { background: var(--accent); }
.stat-accent .stat-progress::after { background: var(--primary-dark); }

/* Члены семьи */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.section-title span {
  margin-left: 0.5rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.member-card {
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  border-top: 3px solid var(--primary-light);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.member-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}

.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.member-card:hover .member-photo {
  transform: scale(1.1);
}

.member-rank {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-dark);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.member-card h3 {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--text);
}

.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: var(--primary-light);
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
}

.stat-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.stat-item strong {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.top-tasks1 h4 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  text-align: center;
}

.top-tasks1 ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.top-tasks1 li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--divider);
  font-size: 0.85rem;
}

.top-tasks1 li:last-child {
  border-bottom: none;
}

.task-name {
  color: var(--text);
}

.task-count {
  color: var(--primary-dark);
  font-weight: 600;
}

/* Лента активности */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.timeline-badge {
  position: absolute;
  left: 12px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 4px solid white;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-content {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-item:hover .timeline-badge {
  transform: scale(1.2);
  background: var(--accent);
}

.user {
  font-weight: 600;
  color: var(--primary-dark);
}

.action {
  color: var(--text-secondary);
}

.task {
  color: var(--text);
  font-weight: 600;
}

.points {
  margin-left: 0.5rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Кнопки для неавторизованных */
.no-family {
  text-align: center;
  max-width: 500px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.no-family h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.no-family p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.family-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: white;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: rgba(76, 175, 80, 0.1);
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #E0E0E0;
    --text-secondary: #9E9E9E;
    --bg: #121212;
    --card-bg: #1E1E1E;
    --divider: #424242;
    --primary-light: #2E7D32;
  }

  .family-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1B5E20 100%);
  }

  .stat-item {
    background: #2E7D32;
  }

  .timeline-badge {
    border-color: #1E1E1E;
  }
}





















/* Кнопка "Выйти из семьи" - новый дизайн */
.leave-family-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 10px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(4px);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leave-family-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Модальное окно - новый дизайн */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.modal-toggle:checked ~ .modal {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 32px;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-toggle:checked ~ .modal .modal-content {
  transform: translateY(0) scale(1);
}

/* Кнопки в модальном окне */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  min-width: 120px;
}

.btn-danger {
  background: linear-gradient(135deg, #ff5e62 0%, #ff2400 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.btn-cancel {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  color: #4a5568;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-cancel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #e6e9ed 0%, #d5d9dd 100%);
}

/* Текст в модальном окне */
.modal-content p {
  font-size: 17px;
  line-height: 1.6;
  color: #4a5568;
  margin-bottom: 0;
}


.modal-toggle {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}










/* Общий контейнер для форм */
.family-form-wrapper {
  max-width: 500px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.family-form-wrapper h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.family-form-wrapper label {
  display: block;
  text-align: left;
  margin-top: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.family-form-wrapper input,
.family-form-wrapper select {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.family-form-wrapper input:focus,
.family-form-wrapper select:focus {
  outline: none;
  border-color: var(--primary);
}

.family-form-wrapper .btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: white;
}

.family-form-wrapper .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.family-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.family-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.family-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text);
}

.family-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}



