:root {
  --color-primary: #ffb3d9;
  --color-secondary: #c9a0dc;
  --color-accent: #b4e4ff;
  --color-bg: #fff8f3;
  --color-bg-alt: #fff0f5;
  --gallery-bg: transparent;
  --polaroid-bg: rgba(255, 255, 255, 0.7);
  --pin-color: #ffb3d9;
  --tape-color: rgba(255, 179, 217, 0.3);
  --font-base: "Quicksand", "Nunito", -apple-system, sans-serif;
  --radius-lg: 24px;
  --shadow-lg: 0 8px 24px rgba(255, 179, 217, 0.25);
  --polaroid-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

body {
  font-family: var(--font-base);
  background: var(--gallery-bg);
  min-height: 100vh;
}

#gallery-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#lock-screen {
  background: linear-gradient(
    135deg,
    var(--color-bg) 0%,
    var(--color-bg-alt) 100%
  );
}

#main-content {
  padding-top: 80px;
  min-height: 100vh;
}

.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.gallery-grid {
  column-count: 4;
  column-gap: 2rem;
}

.gallery-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}

.gallery-hero h1 {
  font-size: 3.5rem;
  color: #ff1493;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(255, 20, 147, 0.2);
  margin-bottom: 0.5rem;
}

.gallery-hero p {
  font-size: 1.2rem;
  color: #8b4513;
  font-weight: 600;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #ffb3d9;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  color: #8b4513;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(255, 179, 217, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 107, 157, 0.2);
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    rgba(255, 179, 217, 0.9),
    rgba(224, 187, 228, 0.9)
  );
  color: white;
  border-color: #ff6b9d;
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.3);
}

.photo-card {
  background: var(--polaroid-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
  box-shadow: var(--polaroid-shadow);
  margin-bottom: 2rem;
  break-inside: avoid;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding: 1rem;
  transform-origin: center;
}

.photo-card:nth-child(6n + 1) { transform: rotate(-2deg); }
.photo-card:nth-child(6n + 2) { transform: rotate(1.5deg); }
.photo-card:nth-child(6n + 3) { transform: rotate(-1deg); }
.photo-card:nth-child(6n + 4) { transform: rotate(2deg); }
.photo-card:nth-child(6n + 5) { transform: rotate(-1.5deg); }
.photo-card:nth-child(6n + 6) { transform: rotate(0.5deg); }

.photo-card:hover {
  transform: translateY(-8px) rotate(-2deg) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
}

.photo-card:nth-child(odd):hover {
  transform: translateY(-8px) rotate(2deg) scale(1.02);
}

.photo-card::before {
  content: "📌";
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 2rem;
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: pinFloat 3s ease-in-out infinite;
}

.photo-card::after {
  content: "";
  position: absolute;
  top: 10px;
  left: -5px;
  right: -5px;
  height: 25px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 179, 217, 0.4),
    rgba(255, 179, 217, 0.4) 10px,
    rgba(224, 187, 228, 0.4) 10px,
    rgba(224, 187, 228, 0.4) 20px
  );
  border-radius: 2px;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

.photo-card:nth-child(even)::after {
  background: repeating-linear-gradient(
    -45deg,
    rgba(180, 228, 255, 0.4),
    rgba(180, 228, 255, 0.4) 8px,
    rgba(201, 160, 220, 0.4) 8px,
    rgba(201, 160, 220, 0.4) 16px
  );
}

.photo-card:nth-child(3n)::after {
  top: auto;
  bottom: 10px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 228, 181, 0.5),
    rgba(255, 228, 181, 0.5) 12px,
    rgba(255, 192, 203, 0.5) 12px,
    rgba(255, 192, 203, 0.5) 24px
  );
}

.photo-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  background: #f5f5f5;
}

.photo-caption {
  padding: 1rem 0.5rem 0.5rem;
  text-align: center;
}

.photo-caption h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.3rem;
  font-family: "Courier New", monospace;
}

.photo-caption p {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

.photo-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.3rem;
}

.photo-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, #ffb3d9, #e0bbe4);
  color: white;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  padding: 2rem;
  overflow: auto;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  text-align: center;
  color: white;
  margin-top: 1.5rem;
  font-size: 1.2rem;
}

.lightbox-caption h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.lightbox-caption p {
  font-size: 1rem;
  opacity: 0.8;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10002;
  opacity: 1;
}

.lightbox-close {
  top: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  backdrop-filter: blur(20px);
}

.lightbox-close svg,
.lightbox-nav svg {
  stroke: white;
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s ease;
}

.lightbox-close svg { width: 24px; height: 24px; }
.lightbox-nav svg { width: 28px; height: 28px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 179, 217, 0.25);
  border-color: rgba(255, 179, 217, 0.5);
  box-shadow: 0 8px 32px rgba(255, 107, 157, 0.3);
}

.lightbox-close:hover { transform: scale(1.1); }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.15); }
.lightbox-close:hover svg { transform: rotate(90deg); }

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-prev:hover svg { transform: translateX(-3px); }
.lightbox-next:hover svg { transform: translateX(3px); }

.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #8b4513;
  opacity: 0.6;
}

.gallery-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

@keyframes pinFloat {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-5px) rotate(-10deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 1024px) {
  .gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .gallery-hero h1 {
    font-size: 2.5rem;
  }
  .gallery-grid {
    column-count: 2;
    column-gap: 1rem;
  }
  .gallery-filters {
    gap: 0.5rem;
  }
  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    column-count: 1;
  }
  .lightbox-nav {
    display: none;
  }
}