/* Основные стили для профиля пользователя */
:root {
  --primary-color: #3498db;
  --primary-hover: #2980b9;
  --secondary-color: #f1f5f9;
  --text-color: #333;
  --text-muted: #6c757d;
  --border-color: #e2e8f0;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 0.5rem;
}

.profile-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .profile-container {
    grid-template-columns: 280px 1fr;
  }
}

/* Компактный режим (постоянный) */
.profile-section-title {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0.1rem;
}

.profile-stat-item {
  padding: 0.25rem 0;
}

.profile-separator {
  margin: 0.5rem 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
}

.profile-username {
  font-size: 1.1rem;
}

.profile-login {
  margin: 0.1rem 0 0.25rem;
}

.profile-badge {
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
}

.profile-action-item {
  padding: 0.35rem 0;
}

.profile-stat-compact {
  gap: 0.35rem;
  margin: 0.35rem 0;
}

.profile-stat-card {
  padding: 0.35rem;
}

.profile-stat-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.profile-stat-number {
  font-size: 1.1rem;
}

.profile-stat-text {
  font-size: 0.65rem;
}

.profile-sidebar {
  position: relative;
}

/* Карточка профиля */
.profile-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.profile-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

.profile-card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
}

.profile-card-content {
  padding: 1rem;
}

/* Аватар пользователя */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 auto 0.75rem;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Информация пользователя */
.profile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1rem;
}

.profile-username {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

.profile-login {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0.35rem;
}

.profile-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
}

/* Статистика пользователя */
.profile-stats {
  width: 100%;
  margin-top: 1rem;
}

.profile-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
}

.profile-stat-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.profile-stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.profile-stat-value {
  font-weight: 500;
  color: var(--text-color);
}

/* Кнопки */
.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.profile-btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.profile-btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

.profile-btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-color);
}

.profile-btn-outline:hover {
  background-color: var(--secondary-color);
}

.profile-btn-success {
  background-color: var(--success-color);
  color: white;
}

.profile-btn-success:hover {
  background-color: #27ae60;
  color: #fff;
}

.profile-btn-danger {
  background-color: var(--danger-color);
  color: white;
}

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

.profile-btn-block {
  display: flex;
  width: 100%;
}

.profile-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Разделитель */
.profile-separator {
  height: 1px;
  width: 100%;
  background-color: var(--border-color);
  margin: 0.75rem 0;
}

/* Иконки */
.profile-icon {
  display: inline-flex;
  margin-right: 0.5rem;
}

/* Метки */
.profile-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

/* Действия профиля */
.profile-actions {
  margin-top: 0.75rem;
}

.profile-action-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.profile-action-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.profile-action-link {
  display: flex;
  align-items: center;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.profile-action-link:hover {
  color: var(--primary-color);
}

/* Тултипы */
.profile-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.profile-tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  pointer-events: none;
}

.profile-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.profile-tooltip:hover .profile-tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Отступы для лучшей читаемости */
.profile-section-content {
  margin-top: 0.75rem;
}

.profile-section + .profile-section {
  margin-top: 1.25rem; /* Увеличенный отступ между секциями */
}

.profile-stat-item:first-child {
  padding-top: 0;
}

.profile-stat-item:last-child {
  padding-bottom: 0;
}

.profile-action-item:first-child {
  padding-top: 0;
}

.profile-action-item:last-child {
  padding-bottom: 0;
}

/* Быстрые действия */
.profile-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.profile-quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--text-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-quick-action:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Стили для кликабельных карточек статистики */
.profile-stat-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.profile-stat-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-stat-card-link:active {
  transform: translateY(0);
}

/* Блоковые заголовки для секций подарков и наград */
.profile-block-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0 0.25rem 0;
  border: none;
  background: none;
  box-shadow: none;
  letter-spacing: 0.01em;
}
.profile-block-title-center {
  display: block;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  padding: 0.25rem 0 0.25rem 0;
  background: none;
  border: none;
  box-shadow: none;
  letter-spacing: 0.01em;
}

/* Сетка для подарков */
.presents-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  /* justify-content: space-between !important; */
  width: 100% !important;
}

/* Отключаем псевдоэлементы для .thumbnails.presents-grid */
.thumbnails.presents-grid:before,
.thumbnails.presents-grid:after {
  display: none !important;
  content: none !important;
}

/* Отключаем float и margin из bootstrap для элементов списка */
.thumbnails.presents-grid > li {
  float: none !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  width: 100px !important;
  height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.2s ease !important;
  cursor: pointer !important;
}

/* Эффект увеличения при наведении */
.thumbnails.presents-grid > li:hover {
  transform: scale(1.1) !important;
  z-index: 10 !important;
}

/* Стили для изображений внутри элементов списка */
.thumbnails.presents-grid > li img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  transition: transform 0.2s ease !important;
}

/* Отключаем margin-left из bootstrap для .thumbnails */
.thumbnails.presents-grid {
  margin-left: 0 !important;
}

.presents-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  min-height: 80px;
  min-width: 80px;
  box-sizing: border-box;
  margin: 0;
}

.presents-grid li img {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Сетка для наград */
.badges-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem 0 !important;
  width: 100% !important;
}

.badges-grid .profile-badge-item {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  width: 100px !important;
  height: 100px !important;
  box-sizing: border-box;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.2s ease !important;
  cursor: pointer !important;
  flex: 0 0 auto !important;
  margin: 0;
}

.badges-grid .profile-badge-item:hover {
  transform: scale(1.1) !important;
  box-shadow: var(--card-shadow);
  z-index: 10 !important;
}

.badges-grid .profile-badge-item img {
  display: block;
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Стили для кармы */
.profile-karma-positive {
  color: #2ecc71;
  font-weight: 600;
}

.profile-karma-negative {
  color: #e74c3c;
  font-weight: 600;
}

.profile-karma-neutral {
  color: var(--text-color);
}

/* Стили для иконки кармы */
.profile-stat-icon.profile-karma-positive {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.profile-stat-icon.profile-karma-negative {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* Стили для карточки кармы */
.profile-stat-card:has(.profile-karma-positive) {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.profile-stat-card:has(.profile-karma-negative) {
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Всегда показываем все действия */
.profile-optional-content {
  display: block; /* Всегда отображаем все действия */
}

.profile-show-more {
  display: none; /* Скрываем кнопку "Показать больше действий" */
}

/* Компактное отображение дат */
.profile-date-compact {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Компактный текст */
.profile-text-compact {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0.25rem 0;
  color: var(--text-muted);
}

/* Вкладки кармы */
.profile-karma-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.profile-karma-tab {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  background-color: var(--secondary-color);
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 0.875rem;
  flex: 1;
  justify-content: center;
}

.profile-karma-tab svg {
  margin-right: 0.35rem;
}

.profile-karma-tab:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
}

.profile-karma-tab.active {
  background-color: var(--primary-color);
  color: white;
}

/* Оптимизация для мобильных устройств */
@media (max-width: 480px) {
  .profile-tooltip-text {
    width: 150px;
    margin-left: -75px;
    font-size: 0.7rem;
    padding: 3px;
  }
  
  .profile-quick-action {
    width: 1.75rem;
    height: 1.75rem;
  }
  
  .profile-quick-actions {
    gap: 0.25rem;
  }
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .profile-container {
    padding: 0.75rem;
  }
  
  .profile-card-content {
    padding: 0.75rem;
  }
  
  .profile-stat-compact {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-avatar {
    width: 64px;
    height: 64px;
  }
  
  .profile-username {
    font-size: 1.1rem;
  }
  
  .profile-section-title {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .profile-container {
    padding: 0.5rem;
  }
  
  .profile-card-content {
    padding: 0.5rem;
  }
  
  .profile-stat-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }
  
  .profile-stat-card {
    padding: 0.35rem;
  }
  
  .profile-avatar {
    width: 56px;
    height: 56px;
    margin-bottom: 0.35rem;
  }
  
  .profile-username {
    font-size: 1rem;
  }
  
  .profile-login {
    font-size: 0.75rem;
  }
  
  .profile-badge {
    padding: 0.1rem 0.35rem;
    font-size: 0.65rem;
  }
  
  .profile-section-title {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }
  
  .profile-stat-item {
    padding: 0.25rem 0;
  }
  
  .profile-stat-label, .profile-stat-value {
    font-size: 0.75rem;
  }
  
  .profile-separator {
    margin: 0.5rem 0;
  }
  
  .profile-action-item {
    padding: 0.35rem 0;
  }
  
  .profile-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Группировка информации */
.profile-section {
  margin-bottom: 0.75rem;
}

.profile-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.profile-section-title:after {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.profile-section.collapsed .profile-section-title:after {
  transform: rotate(-45deg);
}

.profile-section.collapsed .profile-section-content {
  display: none;
}

/* Компактные статистические элементы */
.profile-stat-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.profile-stat-card {
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.profile-stat-number {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1;
}

.profile-stat-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Прогресс-бар */
.profile-progress-bar {
  width: 100%;
  height: 0.5rem;
  background-color: var(--secondary-color);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.25rem 0 0.5rem;
}

.profile-progress-value {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 9999px;
}

/* Стили для шапки профиля */
.profile-header-container {
  margin-bottom: 1.5rem;
}

.profile-header-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.profile-header-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .profile-header-content {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.profile-header-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .profile-header-avatar-section {
    margin-bottom: 0;
  }
}

.profile-header-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 2px solid #e0e0e0;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-edit {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--primary-color);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.profile-avatar-edit:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

.profile-header-info {
  flex: 1;
}

.profile-header-title {
  margin-bottom: 1rem;
}

.profile-username {
  display: flex;
  align-items: center;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-color);
  flex-wrap: wrap;
}

.profile-verified-badge {
  display: inline-flex;
  margin-right: 0.5rem;
  color: var(--success-color);
}

.profile-edit-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.profile-edit-button:hover {
  color: var(--primary-color);
}

.profile-login-history {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.profile-dropdown-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.profile-dropdown-button:hover {
  color: var(--primary-color);
}

.profile-dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 10rem;
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  z-index: 10;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  overflow: hidden;
}

.profile-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-color);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-dropdown-item:hover {
  background-color: var(--secondary-color);
}

.profile-user-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.profile-user-title {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.profile-user-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: rgba(46, 204, 113, 0.1);
  color: var(--success-color);
}

.profile-tabs-container {
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-tabs li {
  margin-bottom: -1px;
}

.profile-tabs li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  transition: all 0.2s ease;
}

.profile-tabs li a:hover {
  color: var(--primary-color);
  border-color: var(--border-color) var(--border-color) transparent;
  text-decoration: none;
}

.profile-tabs li.active a {
  color: var(--text-color);
  background-color: #fff;
  border-color: var(--border-color) var(--border-color) #fff;
  font-weight: 500;
}

/* Стили для формы редактирования логина */
.profile-login-edit {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.profile-input {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  transition: border-color 0.2s ease;
}

.profile-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.profile-login-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Стили для модального окна загрузки аватара */
.profile-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.profile-upload-label:hover {
  border-color: var(--primary-color);
  background-color: rgba(52, 152, 219, 0.05);
}

.profile-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.profile-file-name {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Стили для страницы истории просмотров - ультракомпактная версия */
.profile-history-table-container {
  width: 100%;
  overflow-x: auto;
}

.profile-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem; /* Уменьшенный размер шрифта */
}

.profile-history-table thead {
  background-color: var(--secondary-color);
}

.profile-history-table th {
  padding: 0.35rem 0.25rem; /* Уменьшенные отступы */
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
}

.profile-history-table td {
  padding: 0.35rem 0.25rem; /* Уменьшенные отступы */
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.profile-history-table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.profile-history-date {
  width: 15%; /* Уменьшенная ширина */
  white-space: nowrap;
  font-size: 0.7rem; /* Еще меньший размер для даты */
}

.profile-history-adult,
.profile-history-liked {
  width: 24px; /* Уменьшенная ширина */
  text-align: center;
  padding: 0.25rem !important;
}

.profile-history-book {
  width: auto;
}

.profile-history-chapter {
  width: 25%; /* Уменьшенная ширина */
}

.profile-adult-badge {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  font-size: 0.65rem; /* Уменьшенный размер */
  font-weight: 600;
  padding: 0.05rem 0.2rem; /* Уменьшенные отступы */
  border-radius: 0.2rem;
}

.profile-liked-icon {
  display: inline-flex;
  color: #2ecc71;
  transform: scale(0.8); /* Уменьшенный размер иконки */
}

.profile-deleted-book {
  color: var(--text-muted);
  font-style: italic;
}

.profile-chapter-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.75rem; /* Уменьшенный размер */
}

.profile-chapter-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.profile-pagination {
  margin-top: 0.5rem; /* Уменьшенный отступ */
  display: flex;
  justify-content: center;
}

/* Стили для тегов в боковой панели - компактная версия */
.profile-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem; /* Уменьшенный отступ */
  margin-bottom: 0.5rem; /* Уменьшенный отступ */
}

.profile-tag {
  display: inline-block;
  padding: 0.15rem 0.3rem; /* Уменьшенные отступы */
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--primary-color);
  border-radius: 0.2rem;
  font-size: 0.7rem; /* Уменьшенный размер */
  transition: background-color 0.2s ease;
  line-height: 1;
}

.profile-tag:hover {
  background-color: rgba(52, 152, 219, 0.2);
}

/* Дополнительные стили для компактности */
.profile-card-header {
  padding: 0.5rem 0.75rem; /* Уменьшенные отступы */
}

.profile-card-content {
  padding: 1rem 1.25rem; /* Увеличенные отступы */
}

.profile-card-title {
  font-size: 1rem; /* Уменьшенный размер */
}

.profile-card-description {
  font-size: 0.75rem; /* Уменьшенный размер */
  margin-top: 0.1rem; /* Уменьшенный отступ */
}

.profile-section-title {
  font-size: 0.9rem; /* Увеличенный размер */
  font-weight: 600; /* Полужирный шрифт для лучшей читаемости */
  padding: 0.5rem 0; /* Добавляем вертикальные отступы */
  margin-bottom: 0.15rem; /* Уменьшенный отступ */
}

.profile-section-content {
  padding-bottom: 0.25rem; /* Уменьшенный отступ */
}

.profile-stat-item {
  padding: 0.15rem 0; /* Уменьшенные отступы */
}

.profile-stat-label {
  font-size: 0.75rem; /* Уменьшенный размер */
}

.profile-stat-value {
  font-size: 0.75rem; /* Уменьшенный размер */
}

.profile-separator {
  margin: 0.35rem 0; /* Уменьшенные отступы */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .profile-container {
    gap: 0.5rem; /* Уменьшенный отступ */
    padding: 0.5rem 0; /* Уменьшенные отступы */
  }
  
  .profile-history-date {
    width: auto;
  }
  
  .profile-history-chapter {
    width: auto;
  }
}

/* Стили для графиков и визуализации данных */
.profile-mini-charts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.profile-chart-card {
  flex: 1;
  min-width: 80px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 0.25rem;
  padding: 0.35rem;
  border: 1px solid var(--border-color);
}

.profile-chart-title {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-align: center;
}

.profile-donut-chart {
  width: 100%;
  height: 40px;
  position: relative;
}

.profile-donut-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: all 0.2s ease;
}

.profile-donut-segment:hover {
  transform: scale(1.05);
}

.profile-donut-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  font-weight: 600;
}

.profile-sparkline {
  width: 100%;
  height: 20px;
  display: flex;
  align-items: flex-end;
}

.profile-sparkline-bar {
  flex: 1;
  background-color: var(--primary-color);
  opacity: 0.7;
  margin: 0 1px;
  min-width: 2px;
  border-radius: 1px 1px 0 0;
}

/* Стили для фильтров и сортировки */
.profile-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.profile-filter-btn {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  background-color: var(--secondary-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-filter-btn:hover,
.profile-filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Стили для индикаторов прогресса */
.profile-progress-bar {
  height: 3px;
  background-color: var(--border-color);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 0.15rem;
}

.profile-progress-fill {
  height: 100%;
  background-color: var(--primary-color);
}

/* Стили для статистических блоков */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.profile-stat-mini {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.profile-stat-mini-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
}

.profile-stat-mini-label {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Стили для жанровых индикаторов */
.profile-genre-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.25rem;
}
