/* Gallery Page Styles */
.gallery-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Elements */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-element {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float var(--duration, 10s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-element:nth-child(odd) {
  background: rgba(255, 255, 255, 0.05);
  width: 30px;
  height: 30px;
}

.floating-element:nth-child(3n) {
  background: rgba(255, 255, 255, 0.08);
  width: 15px;
  height: 15px;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(90deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-40px) translateX(-10px) rotate(180deg);
    opacity: 0.8;
  }
  75% {
    transform: translateY(-20px) translateX(15px) rotate(270deg);
    opacity: 0.6;
  }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Navbar */
.glass-navbar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.glass-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  color: white !important;
  text-decoration: none;
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 1;
  padding: 100px 15px 40px 15px;
  min-height: 100vh;
}

/* Page Header */
.page-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  animation: slideInUp 1s ease-out;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4ade80, #22d3ee, #a855f7);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Status Messages */
.alert-modern {
  border-radius: 15px;
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.5s ease-out;
}

.alert-success-modern {
  background: rgba(40, 167, 69, 0.2);
  color: #ffffff !important;
  border: 1px solid rgba(40, 167, 69, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.alert-danger-modern {
  background: rgba(220, 53, 69, 0.2);
  color: #ffffff !important;
  border: 1px solid rgba(220, 53, 69, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.alert-info-modern {
  background: rgba(23, 162, 184, 0.2);
  color: #ffffff !important;
  border: 1px solid rgba(23, 162, 184, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #4ade80;
}

.loading-spinner p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Empty State */
.empty-state {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideInUp 1s ease-out 0.2s both;
}

.empty-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
  display: block;
}

.empty-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.empty-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.btn-primary-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(74, 222, 128, 0.4);
  color: white;
  text-decoration: none;
}

/* Session Cards */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.session-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  animation: slideInUp 1s ease-out var(--delay, 0s) both;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.session-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.session-card-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.session-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.session-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.meta-item.meta-placeholder {
  opacity: 0.7;
  font-style: italic;
}

.meta-item.meta-placeholder i {
  opacity: 0.6;
}

.session-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  min-height: 120px;
}

.photos-grid.uniform-grid {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  align-content: start;
}

.photo-thumbnail {
  width: 100%;
  height: 80px;
  max-width: 80px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.photo-thumbnail:hover {
  transform: scale(1.1) rotate(2deg);
  border-color: #4ade80;
  box-shadow: 0 8px 20px rgba(74, 222, 128, 0.3);
}

.photo-preview-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-style: italic;
  min-height: 80px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.session-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.btn-action {
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  justify-content: center;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn-view {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.btn-view:hover {
  color: white;
}

.btn-download {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.btn-download:hover {
  color: white;
}

.btn-delete {
  background: linear-gradient(135deg, #dc3545, #c82333) !important;
  color: #ffffff !important;
  flex: 0 0 auto;
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border: none !important;
  font-weight: 700 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-delete:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #c82333, #bd2130) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* Clear All Section */
.clear-all-section {
  text-align: center;
  animation: slideInUp 1s ease-out 0.4s both;
}

.btn-clear-all {
  background: rgba(220, 53, 69, 0.15);
  color: #ffffff !important;
  border: 2px solid rgba(220, 53, 69, 0.5);
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 700 !important;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-clear-all:hover {
  background: rgba(220, 53, 69, 0.25);
  border-color: #dc3545;
  transform: translateY(-2px);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Modal Styles */
.modal-content {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  color: #2d3748 !important;
}

.modal-header {
  background: rgba(102, 126, 234, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #2d3748 !important;
}

.modal-title {
  font-weight: 700;
  color: #667eea !important;
}

.modal-body {
  padding: 2rem;
  color: #2d3748 !important;
}

.modal-body p {
  color: #4a5568 !important;
  font-size: 1rem;
  line-height: 1.5;
}

.modal-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-download-modal {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-download-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
  color: white;
}

.modal-footer {
  background: rgba(248, 249, 250, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1rem 2rem;
}

.modal-footer .btn {
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
}

.modal-footer .btn-secondary {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

.modal-footer .btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
    padding: 70px 5px 20px 5px;
  }
  
  .page-header {
    padding: 1.5rem;
  }
  
  .page-title {
    font-size: 1.8rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .sessions-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .session-card-header,
  .session-card-body {
    padding: 1rem;
  }
  
  .photos-grid {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
  
  .photo-thumbnail {
    height: 60px;
  }
  
  .empty-state {
    padding: 3rem 1.5rem;
  }
  
  .empty-icon {
    font-size: 3rem;
  }
  
  .empty-title {
    font-size: 1.5rem;
  }
  
  .btn-clear-all {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .photos-grid.uniform-grid {
    min-height: 100px;
    padding: 0.75rem;
  }
  
  .session-meta {
    grid-template-columns: 1fr !important;
    gap: 0.3rem;
  }
}

@media (max-width: 576px) {
  .session-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .photos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .photo-thumbnail {
    height: 60px;
    max-width: none;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .btn-clear-all {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .photos-grid.uniform-grid {
    grid-template-columns: repeat(3, 1fr);
    min-height: 90px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: rgba(45, 55, 72, 0.95);
  }
  
  .modal-title {
    color: #a0aec0;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating-element,
  .brand-icon {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .session-card,
  .page-header,
  .empty-state {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }
  
  .btn-primary-modern,
  .btn-action {
    border: 2px solid white;
  }
}