/* Основные стили */
.painting-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
  overflow: hidden;
}

.painting-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.painting-image {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.painting-card:hover .painting-image {
  transform: scale(1.05);
}

.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

.dominant-bg {
  background: linear-gradient(135deg, var(--dominant-color, #ffffff) 0%, rgba(255, 255, 255, 0.8) 100%);
}

/* Навигация */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #007bff !important;
}

/* Альбомы */
.album-nav {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.album-link {
  text-decoration: none;
  color: #495057;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  margin: 5px;
  display: inline-block;
  font-weight: 500;
  border: 2px solid transparent;
}

.album-link:hover {
  background: #007bff;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.album-link.active {
  background: #007bff;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Карточки */
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

/* Кнопки */
.btn {
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  padding: 0.5rem 1.5rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

/* Формы */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  padding: 0.75rem 1rem;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

.form-select {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Модальные окна */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  border-radius: 15px 15px 0 0;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 15px 15px;
}

/* Таблицы */
.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  font-weight: 600;
  color: #495057;
}

.table tbody tr {
  transition: background-color 0.3s ease;
}

.table tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* Алерты */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
}

/* Бейджи */
.badge {
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
  border-radius: 15px;
  font-weight: 500;
}

/* Прогресс бары */
.progress {
  border-radius: 10px;
  background-color: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  transition: width 0.6s ease;
}

/* Навигация табов */
.nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 10px 10px 0 0;
  color: #6c757d;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-right: 5px;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  background-color: #f8f9fa;
  color: #007bff;
}

.nav-tabs .nav-link.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Футер */
footer {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #dee2e6;
  margin-top: 50px;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
  .painting-image {
    height: 200px;
  }

  .album-nav {
    padding: 15px;
  }

  .album-link {
    padding: 8px 15px;
    margin: 3px;
    font-size: 0.9rem;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .navbar-brand img {
    height: 35px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .painting-image {
    height: 180px;
  }

  .album-nav {
    padding: 10px;
  }

  .album-link {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }

  .card-body {
    padding: 1rem;
  }
}

/* Специальные эффекты */
.glass-effect {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.shadow-soft {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.shadow-strong {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Стили для drag-and-drop */
.sortable-ghost {
  opacity: 0.4;
  background: #f8f9fa;
}

.sortable-chosen {
  background: #e3f2fd;
}

.sortable-drag {
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: rotate(5deg);
}

/* Стили для карусели */
.carousel-item img {
  border-radius: 0;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 20px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 3px;
}

/* Стили для миниатюр */
.cursor-pointer {
  cursor: pointer;
  transition: all 0.3s ease;
}

.cursor-pointer:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Стили для загрузки изображений */
.image-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-upload-area:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.image-upload-area.dragover {
  border-color: #007bff;
  background-color: #e3f2fd;
}

/* Стили для списка изображений */
.image-item {
  position: relative;
  transition: all 0.3s ease;
}

.image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-item .btn-group {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-item:hover .btn-group {
  opacity: 1;
}

.main-image-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 10;
}

/* Стили для предварительного просмотра */
.image-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Анимации для загрузки */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Улучшенные стили для модальных окон */
.modal-xl .modal-dialog {
  max-width: 1200px;
}

.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Стили для файлового инпута */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  cursor: pointer;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #007bff;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.file-input-label:hover {
  background: #0056b3;
}

/* Адаптивные стили для карусели */
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 10%;
  }

  .carousel-caption {
    display: none !important;
  }

  .carousel-indicators {
    bottom: -30px;
  }
}

/* Стили для сортируемых таблиц */
tbody tr {
  transition: all 0.3s ease;
}

tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

tbody tr.sortable-chosen {
  background-color: rgba(0, 123, 255, 0.1);
}

.grip-handle {
  cursor: grab;
  color: #6c757d;
}

.grip-handle:active {
  cursor: grabbing;
}
