
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --border-radius: 12px;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.glass-morphism {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card {
  border: none;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.border-dashed {
  border: 2px dashed #dee2e6 !important;
  transition: all 0.3s ease;
}

.border-dashed:hover {
  border-color: #667eea !important;
  background: rgba(102, 126, 234, 0.05);
}

.file-upload-area {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.thumbs-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.thumb-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  aspect-ratio: 1;
}

.thumb-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.thumb-item.active {
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.thumb-item:hover .thumb-remove {
  opacity: 1;
}

.cropper-container {
  position: relative;
  min-height: 500px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-image-placeholder {
  text-align: center;
  padding: 3rem;
}

.previews-grid {
  display: grid;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.preview-item {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.preview-item:hover {
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.result-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.result-card img {
  height: 120px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.result-card:hover img {
  transform: scale(1.05);
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn-group .btn {
  border-radius: 6px;
}

.form-select, .form-control {
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Scrollbar Styling */
.thumbs-container::-webkit-scrollbar,
.previews-grid::-webkit-scrollbar {
  width: 6px;
}

.thumbs-container::-webkit-scrollbar-track,
.previews-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.thumbs-container::-webkit-scrollbar-thumb,
.previews-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.thumbs-container::-webkit-scrollbar-thumb:hover,
.previews-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Loading States */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Progress Bar */
.upload-progress {
  transition: all 0.3s ease;
}

/* Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 350px;
}

.notification {
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 15px;
  margin-bottom: 10px;
  border-left: 4px solid;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  border-left-color: #28a745;
}

.notification.warning {
  border-left-color: #ffc107;
}

.notification.error {
  border-left-color: #dc3545;
}

.notification.info {
  border-left-color: #17a2b8;
}

.notification-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}

.notification-content {
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .thumbs-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cropper-container {
    min-height: 300px;
  }
  
  .btn-group {
    flex-wrap: wrap;
  }
  
  .btn-group .btn {
    flex: 1;
    min-width: 60px;
  }
}

/* Animation for new items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.3s ease forwards;
}

/* Badge styling */
.badge {
  font-weight: 500;
}