.cards-blok {
  display: flex;
  flex-direction: column;
  width: 90%;
  height: 100%;
}

.cards-text {
  display: flex;
  height: 100%;
  padding: 5px;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 14px;
}

.cards-text-answer {
  color: var(--accent-color);
}

.cards-settings {
  display: flex;
  flex-direction: row;
  height: 10%;
  justify-content: space-between;
  align-items: center;
  color: rgba(var(--text-color), 0.4);
  opacity: 0;
  transition: all 0.3s ease;
}

.card-settings-btn {
  padding: 8px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: rgba(var(--accent-color), 0.1);
  color: var(--accent-color);
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;

  position: absolute;
  bottom: 10px;
  z-index: 10;
  right: 48%;
}

.box.center-panel:hover .cards-settings {
  opacity: 1;
}

.box.left-quotes:hover .card-settings-btn {
  opacity: 1;
}

.cards-prev {
  padding: 3px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: rgba(var(--accent-color), 0.1);
  color: var(--accent-color);
  cursor: pointer;

  position: absolute;
  bottom: 10px;
  z-index: 10;
}

.cards-next {
  padding: 3px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: rgba(var(--accent-color), 0.1);
  color: var(--accent-color);
  cursor: pointer;

  position: absolute;
  bottom: 10px;
  right: 6%;
  z-index: 10;
}

.ball-card-1 {
  width: 260px;
  height: 260px;
  background: rgba(var(--accent-color-back), 0.1);
  /* Розовый неоновый цвет */
  filter: blur(50px);
  top: 10%;
  left: 70%;
}

.ball-card-2 {
  width: 160px;
  height: 160px;
  background: rgba(var(--accent-color-back), 0.15);
  /* Розовый неоновый цвет */
  filter: blur(50px);
  top: 40%;
  left: 50%;
}

/*  */
/* Модальное окно */

.modal-content {
  background: rgba(46, 46, 46, 0.9);
}

.card-container {
  display: flex;
  width: 95%;
  height: 90%;
}

.card-first-container {
  margin: 5px;
  width: 50%;
  /* border: 1px solid green; */
}

.card-second-container {
  margin: 5px;
  width: 50%;
  /* border: 1px solid green; */
}

.card-form {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.card-question-div {
  width: 40%;
}

.card-question-input {
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--text-color);
  font-size: 12px;
  width: 90%;
}

.card-question-input:focus {
  outline: none;
  /* Убирает стандартную браузерную обводку */
}

.card-answer-div {
  width: 40%;
}

.card-answer-input {
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: transparent;
  color: var(--text-color);
  font-size: 12px;
  width: 90%;
}

.card-answer-input:focus {
  outline: none;
  /* Убирает стандартную браузерную обводку */
}

.card-add-div {
  width: 16%;
}

.card-add-btn {
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: rgba(var(--accent-color), 0.1);
  color: var(--text-color);
  cursor: pointer;
  height: 100%;
  width: 100%;
}

.list-group-cards {
  max-height: 45vh;
  width: 100%;
  padding: 0px;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.list-group-cards:hover {
  overflow-y: auto;
}

.list-group-cards::-webkit-scrollbar {
  width: 2px;
}

.list-group-cards::-webkit-scrollbar-track {
  background: rgba(var(--text-color), 0.1);
  border-radius: 3px;
}

.list-group-cards::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

.list-group-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(var(--text-color), 0.03);
  border: 1px solid rgba(var(--accent-color), 0.1);
  margin-top: 8px;
  border-radius: 8px;
  width: 92%;
}

.list-card-question {
  color: var(--text-color);
  width: 30%;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  /* text-align: justify; */
}

.list-card-answer {
  padding: 5px;
  color: rgba(var(--accent-color));
  /* color: var(--text-color); */
  width: 80%;
  font-size: 10px;
  text-align: justify;
}

.card-delete-btn {
  padding: 8px 12px;
  border: 1px solid rgba(var(--accent-color), 0.3);
  border-radius: 6px;
  background: rgba(var(--accent-color), 0.1);
  color: var(--text-color);
  cursor: pointer;
  height: 100%;
}

/* .trash-icon {
  width: 16px;
  height: 16px;
  filter: invert(0.8);
  transition: all 0.3s ease;
} */

/* Новости цитат */

/* Общие стили блока */
.card-news {
  /* border: 1px solid white; */
  margin-left: 40px;
  margin-top: 0px;
  padding: 15px;
  height: 100%;
  width: 100%;
}

/* Шапка блока */
.card-header {
  margin-bottom: 20px;
  margin-top: 0px;
  color: var(--text-color);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 0 0 15px 0; /* Внутренний отступ снизу */
  margin-bottom: 0; /* Убираем внешний отступ */
}

.card-decor-line {
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(var(--accent-color), 0.4) 50%,
      transparent 100%);
  margin: 10px 0;
}

/* ПЕРЕПИСЫВАЕМ СТИЛИ .card-header */
.card-header {
  position: relative; /* Ключевое изменение! */
  padding-bottom: 20px; /* Место для линии */
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0; /* Убираем старый margin */
}

/* ЗАМЕНЯЕМ .card-decor-line на псевдоэлемент */
.card-header::after {
  content: "";
  position: absolute;
  bottom: 10px; /* Позиционируем линию */
  left: 50%;
  transform: translateX(-50%);
  width: 200%; /* Ширина линии */
  height: 1px;
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(var(--accent-color), 0.8) 50%, 
    transparent 100%
  );
  display: block;
}

.card-header {
  display: block;
  text-align: center;
  position: relative;
}

/* Принудительное центрирование */
.card-header {
  left: 50%;
  transform: translateX(-50%);
  width: max-content; /* Ширина по содержимому */
  max-width: 100%; /* Защита от переполнения */
}

/* ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ */
.card-news {
  position: relative; /* Контекст для позиционирования */
  overflow: visible; /* Разрешаем выход за границы */
}



/* Список советов */
.card-list {
  overflow-y: hidden;
  scrollbar-gutter: stable;
  width: 100%;
  height: 41vh;
}

.card-list:hover {
  overflow-y: auto;
}

/* Кастомизация скролла */
.card-list::-webkit-scrollbar {
  width: 2px;
}

.quote-list::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-color), 0.5);
  border-radius: 3px;
}

.card-list::-webkit-scrollbar-track {
  background: rgba(var(--text-color), 0.05);
}

/* Карточка совета */
.card-card {
  background: rgba(var(--primary-color), 0.1);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.card-card:hover {
  background: rgba(var(--primary-color), 0.15);
}

.card-icon {
  font-size: 1.6em;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-content h4 {
  color: var(--success-light);
  margin: 0 0 5px 0;
  font-size: 12px;
}

.card-content p {
  color: var(--text-color);
  /* color: rgba(var(--text-color), 0.8); */
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}

/* Чекбокс */
/* Скрываем нативный чекбокс */
.card-check {
  width: 18px;
  height: 18px;
  accent-color: var(--success-light);
  cursor: pointer;
}

/* Мобильные стили для карточек */
@media (max-width: 768px) {
  #cardsModal .modal-content {
      width: 95vw !important;
      max-width: 100vw;
      height: 90vh !important;
      margin: 5vh auto !important;
      padding: 10px;
      box-sizing: border-box;
  }

  .card-container {
      flex-direction: column;
      width: 100%;
      height: auto;
  }

  .card-first-container,
  .card-second-container {
      width: 100% !important;
      margin: 5px 0 !important;
  }

  /* Адаптация формы добавления карточек */
  .card-form {
      flex-direction: column;
      gap: 10px;
  }

  .card-question-div,
  .card-answer-div,
  .card-add-div {
      width: 100% !important;
  }

  .card-question-input,
  .card-answer-input {
      width: 100% !important;
      box-sizing: border-box;
  }

  .card-add-btn {
      width: 100%;
      padding: 12px;
  }

  /* Стили для списка карточек */
  .list-group-cards {
      max-height: 30vh;
      width: 100%;
  }

  .list-group-card {
      flex-direction: column;
      align-items: flex-start;
      padding: 12px;
      width: 93%;
  }

  .list-card-question,
  .list-card-answer {
      width: 100% !important;
      margin-bottom: 5px;
  }

  /* Стили для рекомендаций */
  .card-news {
      margin-left: 0;
      padding: 10px;
  }

  .card-list {
      height: 30vh;
  }

  .card-card {
      flex-direction: column;
      align-items: flex-start;
      padding: 12px;
  }

  .card-icon {
      margin-bottom: 8px;
  }

  /* Адаптация заголовка */
  .card-header {
      font-size: 16px;
      padding-bottom: 15px;
      margin-bottom: 15px;
  }

  .card-header::after {
      width: 100%;
      bottom: 5px;
  }

  /* Адаптация текста в карточках */
  .card-content h4 {
      font-size: 14px;
  }

  .card-content p {
      font-size: 12px;
  }
}