/* ==========================================================================
   Premium 4K Digital Wedding Album Design System
   Color Palette: Deep Ink Charcoal, Champagne Gold, Pearl White, Royal Crimson
   ========================================================================== */

:root {
  --color-bg: #050507;
  --color-surface: rgba(18, 18, 24, 0.75);
  --color-surface-hover: rgba(28, 28, 38, 0.85);
  --color-border: rgba(212, 175, 55, 0.18);
  --color-border-hover: rgba(212, 175, 55, 0.4);
  --color-primary: #d4af37; /* Champagne Gold */
  --color-primary-rgb: 212, 175, 55;
  --color-secondary: #f0e6d2; /* Pearl Cream */
  --color-text: #eae6df;
  --color-text-muted: #9f9a8f;
  --font-serif: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
  --transition-smooth: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.25s ease;
  --glass-blur: blur(20px);
  
  /* Matte Frame Defaults (Charcoal) */
  --frame-bg: #121216;
  --frame-outer-border: 1px solid rgba(212, 175, 55, 0.2);
  --frame-inner-gold-1: 1px solid rgba(212, 175, 55, 0.4);
  --frame-inner-gold-2: 2px solid rgba(212, 175, 55, 0.85);
  --frame-text-color: #eae6df;
  --frame-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Interactive Frame Themes
   ========================================================================== */
body.frame-theme-charcoal {
  --frame-bg: #121216;
  --frame-outer-border: 1px solid rgba(212, 175, 55, 0.25);
  --frame-inner-gold-1: 1px solid rgba(212, 175, 55, 0.4);
  --frame-inner-gold-2: 2px solid rgba(212, 175, 55, 0.85);
  --frame-text-color: #eae6df;
  --frame-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), inset 0 0 50px rgba(0, 0, 0, 0.9);
}

body.frame-theme-ivory {
  --frame-bg: #fdfaf4;
  --frame-outer-border: 1px solid rgba(184, 151, 66, 0.35);
  --frame-inner-gold-1: 1px solid rgba(184, 151, 66, 0.4);
  --frame-inner-gold-2: 2px solid rgba(184, 151, 66, 0.8);
  --frame-text-color: #2b2723;
  --frame-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), inset 0 0 35px rgba(255, 255, 255, 0.9), 0 0 0 8px #fcf9f2;
}

body.frame-theme-crimson {
  --frame-bg: #4a0b12; /* Rich Velvet Crimson */
  --frame-outer-border: 1px solid rgba(240, 211, 141, 0.3);
  --frame-inner-gold-1: 1px solid rgba(240, 211, 141, 0.4);
  --frame-inner-gold-2: 2px solid rgba(240, 211, 141, 0.85);
  --frame-text-color: #f7eed7;
  --frame-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(0, 0, 0, 0.85);
}

/* Reset & Basic Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Background Elements */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

#ambient-backdrop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  height: 95vh;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.08) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  filter: blur(100px);
  transition: background 1.5s ease-in-out;
}

/* Elegant Lace / Floral Overlay */
.luxury-overlay-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath fill='%23d4af37' fill-opacity='1' d='M9 15c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm90 0c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zM9 105c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm90 0c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm21-45c0 16.57-13.43 30-30 30S60 76.57 60 60s13.43-30 30-30 30 13.43 30 30zM30 60c0 16.57-13.43 30-30 30S-30 76.57-30 60s13.43-30 30-30 30 13.43 30 30z'/%3E%/svg%3E");
}

.app-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 3rem 4rem;
  max-width: 1920px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .app-container {
    padding: 1.5rem 1rem;
  }
}

/* ==========================================================================
   Header & Gold Nameplate
   ========================================================================== */
.app-header {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: fadeInDown 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.logo .letter {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: 0.4em;
  line-height: 1;
  margin-left: 0.4em; /* Offset letter-spacing */
  margin-bottom: 0.5rem;
}

.logo .divider {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin-bottom: 0.5rem;
}

.logo .sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--color-text-muted);
}

/* Gold Engraved Nameplate */
.gold-nameplate-container {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  perspective: 1000px;
}

.gold-nameplate {
  background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  padding: 15px 45px;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(255,255,255,0.1),
              inset 0 1px 0 rgba(255,255,255,0.3),
              inset 0 -1px 0 rgba(0,0,0,0.2);
  border: 1px solid #8a6f27;
  position: relative;
  transform: rotateX(5deg);
  transition: transform 0.5s ease;
}

.gold-nameplate:hover {
  transform: rotateX(0deg) scale(1.02);
}

.gold-nameplate::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px solid rgba(138, 111, 39, 0.5);
  pointer-events: none;
}

.album-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #1a150b; /* Engraved look */
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8), -1px -1px 1px rgba(0,0,0,0.4);
  line-height: 1.2;
}

.nameplate-sub {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #382c0f;
  margin-top: 4px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.album-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-primary);
  font-weight: 300;
  margin-top: 1rem;
}

/* Audio Player */
.music-player-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 1.8rem;
  padding: 8px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-fast);
}

.music-player-container:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.1);
}

.music-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.audio-waves {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
  width: 25px;
}

.audio-waves span {
  display: block;
  width: 2px;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.audio-waves.playing span {
  animation: wave 1.2s ease-in-out infinite alternate;
}

.audio-waves.playing span:nth-child(1) { animation-delay: -0.4s; }
.audio-waves.playing span:nth-child(2) { animation-delay: -0.2s; }
.audio-waves.playing span:nth-child(3) { animation-delay: -0.6s; }
.audio-waves.playing span:nth-child(4) { animation-delay: -0.1s; }
.audio-waves.playing span:nth-child(5) { animation-delay: -0.5s; }

/* ==========================================================================
   Navigation Bar & Theme Controls
   ========================================================================== */
.navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.2rem 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  backdrop-filter: var(--glass-blur);
  margin-bottom: 3.5rem;
  z-index: 10;
  animation: fadeInUp 1s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
}

@media (max-width: 1200px) {
  .navigation-bar {
    flex-direction: column;
    padding: 1.5rem;
  }
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--color-bg);
  background: var(--color-primary);
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

/* Frame Customizer */
.frame-customizer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customizer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}

.frame-options {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-opt-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.frame-opt-btn .swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.frame-opt-btn .swatch.charcoal { background-color: #121216; }
.frame-opt-btn .swatch.ivory { background-color: #fdfaf4; }
.frame-opt-btn .swatch.crimson { background-color: #4a0b12; }

.frame-opt-btn .opt-text {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.frame-opt-btn:hover .opt-text {
  color: var(--color-text);
}

.frame-opt-btn.active {
  background: rgba(255, 255, 255, 0.06);
}

.frame-opt-btn.active .opt-text {
  color: var(--color-primary);
  font-weight: 500;
}

/* View Mode Toggles */
.view-modes {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition-fast);
}

.mode-btn:hover {
  color: var(--color-text);
}

.mode-btn.active {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1);
  box-shadow: inset 0 0 8px rgba(var(--color-primary-rgb), 0.15);
}

@media (max-width: 480px) {
  .mode-btn span {
    display: none;
  }
}

/* ==========================================================================
   Viewport Sections
   ========================================================================== */
.album-viewport {
  flex-grow: 1;
  position: relative;
  min-height: 500px;
  z-index: 5;
  margin-bottom: 2rem;
}

.view-section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Unified Luxury Photo Frames (Matte Mounting Board)
   ========================================================================== */
.matte-frame {
  background: var(--frame-bg);
  border: var(--frame-outer-border);
  padding: 3.5% 3.5% 5.5% 3.5%; /* Space for text plate at the bottom */
  box-shadow: var(--frame-shadow);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* Inner Gold Filigree Bevel lines */
.matte-frame::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 45px;
  border: var(--frame-inner-gold-1);
  pointer-events: none;
  z-index: 10;
}

.matte-frame::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 48px;
  border: var(--frame-inner-gold-2);
  pointer-events: none;
  z-index: 10;
}

/* Image Container within Frame */
.frame-img-box {
  width: 100%;
  height: 100%;
  position: relative;
  background: #020202;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.8), 0 1px 3px rgba(255,255,255,0.05);
  border: 1px solid rgba(0,0,0,0.6);
}

.frame-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  filter: brightness(0.92) contrast(1.03);
}

/* Engraved Text Plate at the bottom of the Frame */
.frame-plate {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--frame-text-color);
  font-weight: 300;
  text-transform: uppercase;
  z-index: 15;
  transition: color 0.5s ease;
  opacity: 0.85;
}

.frame-plate span {
  font-size: 0.65rem;
  font-family: var(--font-sans);
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-left: 8px;
  opacity: 0.9;
}

/* ==========================================================================
   1. Grid Gallery View
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 2.5rem;
  animation: fadeIn 0.8s ease;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.gallery-card-wrap {
  cursor: pointer;
  perspective: 1000px;
}

.gallery-card-wrap:hover .matte-frame {
  transform: translateY(-8px) scale(1.015) rotateX(1deg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 15px rgba(var(--color-primary-rgb), 0.15);
}

.gallery-card-wrap:hover img {
  transform: scale(1.05);
  filter: brightness(1.02) contrast(1.03);
}

.gallery-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.gallery-card-wrap:hover .gallery-hover-overlay {
  opacity: 1;
}

.zoom-icon-glow {
  width: 50px;
  height: 50px;
  background: rgba(var(--color-primary-rgb), 0.9);
  color: #121216;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.6);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-card-wrap:hover .zoom-icon-glow {
  transform: scale(1.0);
}

/* ==========================================================================
   2. 3D Book Mode
   ========================================================================== */
.book-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.book-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 8px 22px;
  border-radius: 30px;
  backdrop-filter: var(--glass-blur);
}

.book-nav-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 12px;
  transition: var(--transition-fast);
}

.book-nav-btn:hover {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.6);
}

.book-page-indicator {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.book-wrapper {
  perspective: 2500px;
  width: 100%;
  max-width: 1300px;
  aspect-ratio: 2.2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.book-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 6px;
  /* Apply Matte Mount Style to the open book base! */
  background: var(--frame-bg);
  border: var(--frame-outer-border);
  box-shadow: var(--frame-shadow);
  transition: var(--transition-smooth);
}

/* Elegant Center Spine Shadow */
.book-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.7) 100%);
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

/* Open Book Borders */
.book-3d::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: var(--frame-inner-gold-1);
  pointer-events: none;
  z-index: 10;
  transition: var(--transition-smooth);
}

/* Individual Book Page Sheet */
.book-page {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 14px;
  width: calc(50% - 14px);
  transform-origin: right center;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 10;
  cursor: pointer;
}

.book-page.right {
  left: 50%;
  width: calc(50% - 14px);
  transform-origin: left center;
  z-index: 5;
}

.page-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  background: #020203;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.9);
  border: 1px solid rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-face.back {
  transform: rotateY(180deg);
}

/* Inside the Page Face - Split Panoramic Images */
.page-face img {
  width: 200%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  filter: brightness(0.9) contrast(1.02);
  transition: filter 0.6s ease;
}

.page-face:hover img {
  filter: brightness(1.0) contrast(1.02);
}

/* Left Page views the left half of the wide image */
.book-page.left .page-face.front img {
  left: 0;
}
.book-page.left .page-face.back img {
  right: 0;
}

/* Right Page views the right half of the wide image */
.book-page.right .page-face.front img {
  right: 0;
}
.book-page.right .page-face.back img {
  left: 0;
}

/* 3D Flip States */
.book-page.flipped {
  transform: rotateY(-180deg);
  z-index: 20;
}

.book-page.right.flipped {
  transform: rotateY(180deg);
  z-index: 20;
}

/* Inner gold line offset inside page faces */
.page-face::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: var(--frame-inner-gold-2);
  pointer-events: none;
  z-index: 100;
  opacity: 0.85;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   3. Cinematic Slideshow View
   ========================================================================== */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  aspect-ratio: 2.2 / 1;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  /* Apply Matte Mount Style to Slideshow Container! */
  background: var(--frame-bg);
  border: var(--frame-outer-border);
  box-shadow: var(--frame-shadow);
  padding: 1.5% 1.5% 4.5% 1.5%;
  transition: var(--transition-smooth);
}

/* Gold details on slideshow borders */
.slideshow-container::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 35px;
  border: var(--frame-inner-gold-1);
  pointer-events: none;
  z-index: 10;
  transition: var(--transition-smooth);
}

.slideshow-slide-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  background: #020202;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.9);
  border: 1px solid rgba(0,0,0,0.6);
}

.slideshow-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.slideshow-slide.active {
  opacity: 1;
  z-index: 2;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.93);
  transition: transform 6s linear;
}

.slideshow-slide.active img {
  transform: scale(1.04);
}

.slide-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12;
  transition: var(--transition-fast);
}

.slide-nav-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.3);
}

.slide-nav-btn.prev { left: 30px; }
.slide-nav-btn.next { right: 30px; }

.slideshow-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 12;
}

.slideshow-ctrl-btn {
  background: none;
  border: none;
  color: var(--frame-text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.85;
}

.slideshow-ctrl-btn:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.slideshow-progress-bar {
  flex-grow: 1;
  height: 2px;
  background: rgba(var(--color-primary-rgb), 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.slideshow-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
}

/* ==========================================================================
   4K Lightbox Viewer
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 5, 0.97);
  backdrop-filter: blur(15px);
  z-index: -1;
}

.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  z-index: 1010;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.lightbox-caption {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
}

.lightbox-actions {
  display: flex;
  gap: 12px;
}

.lightbox-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-btn:hover {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.2);
}

.lightbox-btn.close {
  background: rgba(230, 80, 80, 0.1);
  border-color: rgba(230, 80, 80, 0.2);
  color: #ff6b6b;
}

.lightbox-btn.close:hover {
  background: #ff4747;
  color: #fff;
  border-color: #ff4747;
  box-shadow: 0 0 15px rgba(255, 71, 71, 0.4);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--color-text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 1010;
  transition: var(--transition-fast);
}

.lightbox-nav:hover {
  background: rgba(var(--color-primary-rgb), 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.3);
}

.lightbox-nav.prev { left: 40px; }
.lightbox-nav.next { right: 40px; }

.lightbox-image-container {
  width: 90vw;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1005;
}

/* Lightbox Frame Wrap matching the chosen design frame */
.lightbox-frame-wrap {
  background: var(--frame-bg);
  border: var(--frame-outer-border);
  padding: 1.5vw 1.5vw 3.5vw 1.5vw;
  box-shadow: var(--frame-shadow);
  border-radius: 4px;
  position: relative;
  max-width: 95%;
  max-height: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.lightbox-frame-wrap::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 2.2vw;
  border: var(--frame-inner-gold-1);
  pointer-events: none;
  z-index: 10;
  transition: var(--transition-smooth);
}

.lightbox-frame-wrap::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 2.4vw;
  border: var(--frame-inner-gold-2);
  pointer-events: none;
  z-index: 10;
  transition: var(--transition-smooth);
}

.lightbox-frame-wrap img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.9);
  border-radius: 2px;
  transition: transform 0.1s ease-out;
  cursor: grab;
}

.lightbox-frame-wrap img:active {
  cursor: grabbing;
}

.lightbox-hud {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1010;
  pointer-events: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.02);
}

.copyright {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wave {
  0% { transform: scaleY(0.1); }
  100% { transform: scaleY(1); }
}
