* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-bg: #0f172a;          
  --secondary-bg: #1e293b;        
  --accent-blue: #3b82f6;         
  --accent-light: #60a5fa;        
  --overlay-dark: rgba(0, 0, 0, 0.8);
  --text-dark: #e2e8f0;           
  --text-muted: #94a3b8;          
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
}

.gallery-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.8s ease-out;
}

.gallery-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -1px;
  color: var(--accent-light);
  text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.gallery-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  animation: fadeIn 0.8s ease-out 0.4s both;
  margin-bottom: 80px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
  animation: scaleIn 0.6s ease-out;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.photo-item.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  will-change: transform;
}

.photo-item:hover img {
  transform: scale(1.08);
}

/* Normal Photo Hover Effect */
.photo-item:not(.restricted):hover {
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

.photo-item:not(.restricted):hover img {
  filter: brightness(1.1);
}

/* Restricted photo blur effect with "Click to View" text overlay */
.photo-item.restricted img {
  filter: blur(12px);
  transition: var(--transition-smooth);
}

.photo-item.restricted:hover img {
  filter: blur(12px) brightness(0.9);
}

.photo-item.restricted:hover {
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.5);
}

.photo-item.restricted::after {
  content: "Click to View";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  z-index: 10;
  pointer-events: none;
  animation: fadeIn 0.4s ease-out;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Photo Info */
.photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  transform: translateY(100%);
  transition: var(--transition-smooth);
  z-index: 5;
}

.photo-item:hover .photo-info {
  transform: translateY(0);
}

.photo-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--accent-light);
}

.photo-category {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.4);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 40px;
  font-weight: bold;
  color: var(--accent-blue);
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 1001;
}

.modal-close:hover {
  color: var(--accent-light);
  transform: scale(1.2);
}

.modal-title {
  text-align: center;
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--accent-light);
  font-weight: 600;
}

/* Footer */
.gallery-footer {
  text-align: center;
  padding-top: 40px;
  border-top: 2px solid rgba(59, 130, 246, 0.2);
  margin-top: 60px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--accent-blue);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.social-icon:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.photo-item.loading {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 25%, rgba(59, 130, 246, 0.2) 50%, rgba(59, 130, 246, 0.1) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-header h1 { font-size: 2.5rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
  .modal-close { top: -35px; font-size: 32px; }
}

@media (max-width: 480px) {
  .gallery-container { padding: 40px 15px; }
  .gallery-header h1 { font-size: 2rem; }
  .gallery-header p { font-size: 1rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
  .photo-title { font-size: 0.95rem; }
  .social-links { gap: 15px; }
  .social-icon { width: 40px; height: 40px; font-size: 1rem; }
}
