/* Modern Pastel Arch & Dome Luxury Theme v12 */
:root {
  --bg-main: #fcfbf9;
  --bg-card: #ffffff;
  --bg-glass: rgba(252, 251, 249, 0.96);

  --pastel-peach: #fde8e1;
  --pastel-pink: #fce4ec;
  --pastel-mint: #daf2e9;
  --pastel-lavender: #eae7fa;
  --pastel-blue: #deebfa;
  --pastel-yellow: #fef8d3;

  --text-primary: #2b2d42;
  --text-dark: #1d1e20;
  --text-secondary: #6c727f;
  --text-muted: #9aa0a6;

  --accent-gold: #c5a059;
  --accent-rose: #e8a598;
  --danger: #ef4444;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-arch: 90px 90px 22px 22px;
  --radius-card: 22px;
  --radius-pill: 40px;
  --radius-sm: 14px;

  --shadow-soft: 0 12px 36px rgba(220, 190, 180, 0.28);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 12px 36px rgba(180, 160, 150, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  line-height: 1.5;
}

html {
  height: -webkit-fill-available;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #e8e2dc;
  border-radius: 4px;
}

/* Redesigned Ambient Pastel Login Screen */
.auth-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #fde8e1 0%, #fcfbf9 45%, #eae7fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Ambient Background Blobs */
.auth-bg-blob1 {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: var(--pastel-pink);
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.7;
}

.auth-bg-blob2 {
  position: absolute;
  bottom: -90px;
  right: -90px;
  width: 320px;
  height: 320px;
  background: var(--pastel-lavender);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.8;
}

.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid #ffffff;
  border-radius: 36px;
  padding: 44px 32px 36px 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  animation: archFloatIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes archFloatIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-arch-top {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  background: var(--pastel-peach);
  border-radius: 32px 32px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(232, 165, 152, 0.2);
}

.auth-card .monogram {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent-rose);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 6px;
}

.auth-card h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-card .auth-subtitle {
  font-size: 0.88rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.auth-card p.auth-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 26px;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.pin-digit {
  width: 44px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--pastel-peach);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-digit.active {
  border-color: var(--accent-rose);
  background: var(--pastel-pink);
  box-shadow: 0 4px 16px rgba(232, 165, 152, 0.35);
  transform: translateY(-2px) scale(1.04);
}

.pin-input-real {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.keypad-btn {
  background: #ffffff;
  border: 1.5px solid #f2e9e2;
  border-radius: 50%;
  aspect-ratio: 1;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all 0.18s ease;
  user-select: none;
}

.keypad-btn:active {
  background: var(--pastel-peach);
  border-color: var(--accent-rose);
  transform: scale(0.92);
}

.keypad-btn.btn-action {
  font-size: 1.1rem;
  color: var(--accent-rose);
  background: rgba(253, 232, 225, 0.4);
  border-color: transparent;
}

.auth-error {
  margin-top: 16px;
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 20px;
  font-weight: 600;
}

/* Header & Top Bar */
.app-header {
  padding: max(16px, env(safe-area-inset-top)) 24px 12px 24px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.top-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guest-badge {
  background: var(--pastel-peach);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-icon {
  background: #ffffff;
  border: 1px solid #efe8e2;
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--pastel-lavender);
  color: var(--text-primary);
}

.btn-share-photo {
  background: var(--pastel-pink);
  color: var(--text-primary);
  border: 1px solid var(--accent-rose);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(232, 165, 152, 0.2);
  transition: transform 0.2s ease;
}

.btn-share-photo:hover {
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 24px;
}

.hero-tag {
  display: inline-block;
  background: var(--pastel-pink);
  color: var(--accent-rose);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.15;
}

/* Top Category Filter Tabs (.category-tabs-container) */
.category-section {
  padding: 0 20px;
  margin-bottom: 24px;
}

.category-tabs-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #efe7e1;
  border-radius: var(--radius-pill);
  padding: 6px;
  box-shadow: var(--shadow-card);
  max-width: 480px;
  margin: 0 auto;
}

.cat-pill {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.22s ease;
  user-select: none;
}

.cat-pill .cat-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.cat-pill.active {
  background: var(--pastel-peach);
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(232, 165, 152, 0.3);
}

.cat-pill:hover:not(.active) {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}

/* Pill Collections (.pill-card) */
.pill-section {
  margin-bottom: 24px;
  padding: 0 20px;
}

.pill-collections {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill-card {
  background: var(--bg-card);
  border: 1.5px solid #efe7e1;
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  user-select: none;
}

.pill-card.active {
  background: var(--pastel-peach);
  border-color: var(--accent-rose);
  box-shadow: 0 4px 16px rgba(232, 165, 152, 0.25);
}

.pill-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.pill-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pill-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.pill-card.active .pill-badge {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Media Badges on Grid Cards */
.media-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 5;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-official {
  background: rgba(252, 251, 249, 0.88);
  color: var(--text-dark);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

.badge-guest {
  background: rgba(253, 232, 225, 0.92);
  color: var(--text-dark);
  border: 1px solid rgba(232, 165, 152, 0.45);
}

/* Lightbox Credit Styling */
.lightbox-credit {
  text-align: center;
  margin-top: 6px;
  color: #ffffff;
}

.lightbox-credit .credit-title {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.95;
}

.lightbox-credit .credit-title strong {
  color: var(--pastel-peach);
  font-weight: 700;
}

.lightbox-credit .credit-caption {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--pastel-pink);
  margin-top: 3px;
}

/* Selfie Banner Components */
.selfie-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 22px;
  background: var(--pastel-peach);
  border: 2px solid #ffffff;
  box-shadow: 0 8px 24px rgba(232, 165, 152, 0.2);
  cursor: pointer;
  margin-bottom: 22px;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease;
}

.selfie-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(232, 165, 152, 0.35);
}

.selfie-icon {
  font-size: 1.8rem;
  background: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(232, 165, 152, 0.25);
  animation: pulseShimmer 2.5s infinite ease-in-out;
}

@keyframes pulseShimmer {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.1); box-shadow: 0 6px 20px rgba(232, 165, 152, 0.4); }
}

.selfie-text h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.selfie-text p {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.selfie-arrow {
  margin-left: auto;
  font-size: 1.25rem;
  color: var(--accent-rose);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.selfie-banner:hover .selfie-arrow {
  transform: translateX(4px);
}

/* Face Search Result Banner */
.face-result-banner {
  background: var(--pastel-mint);
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  border-radius: 18px;
  padding: 14px 22px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(218, 242, 233, 0.6);
  animation: bannerFadeDown 0.4s ease;
}

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

.face-result-banner.hidden {
  display: none !important;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.btn-text:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* 100% Native Mobile Camera Modal (#selfieModal) */
.selfie-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: #000000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transition: opacity 0.35s ease;
  user-select: none;
}

.selfie-modal.hidden {
  display: none !important;
}

/* Force Hidden Input File */
input[type="file"]#fileUploadSelfie {
  display: none !important;
}

/* Screen Flash Overlay */
.camera-flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 2600;
  opacity: 0.9;
  transition: opacity 0.15s ease-out;
}

.camera-flash.hidden {
  display: none !important;
}

/* Top Bar Controls */
.selfie-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 20px 0 20px;
}

.selfie-title-tag {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.selfie-close-btn {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.selfie-close-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

/* Full Viewport Camera Wrapper */
.selfie-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.selfie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Oval Scanner Frame Overlay */
.selfie-overlay-oval {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  overflow: hidden;
}

.laser-scanner {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pastel-pink), var(--accent-gold), transparent);
  box-shadow: 0 0 14px var(--accent-gold);
  animation: laserScan 2.4s infinite ease-in-out;
}

@keyframes laserScan {
  0% { top: 5%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

/* Floating Native Action Controls Dock (.camera-controls-dock) */
.camera-controls-dock {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.btn-gallery-trigger {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-gallery-trigger:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.35);
}

.btn-shutter-native {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  transition: transform 0.15s ease;
}

.btn-shutter-native:active {
  transform: scale(0.92);
}

.btn-shutter-native .shutter-inner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  transition: background 0.15s ease;
}

.btn-shutter-native:active .shutter-inner {
  background: var(--pastel-peach);
}

.btn-flip-trigger {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-flip-trigger:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.35);
}

/* Minimalist Processing Overlay */
.selfie-loading {
  position: absolute;
  inset: 0;
  z-index: 2550;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
}

.selfie-loading.hidden {
  display: none !important;
}

.camera-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.selfie-loading p {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* Upload Media Modal & Guestbook Modal */
.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(20, 22, 30, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.upload-modal.hidden {
  display: none !important;
}

.upload-modal-content {
  background: var(--bg-card);
  border-radius: 32px;
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-float);
}

.upload-modal-content h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.upload-form-group {
  margin-top: 16px;
  text-align: left;
}

.upload-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

.upload-input-file {
  width: 100%;
  padding: 12px;
  background: var(--bg-main);
  border: 1.5px dashed #efe7e1;
  border-radius: 16px;
  font-size: 0.85rem;
}

.upload-input-text {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-main);
  border: 1.5px solid #efe7e1;
  border-radius: 16px;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
}

.upload-input-text:focus {
  border-color: var(--accent-rose);
}

.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

@media (min-width: 640px) {
  .modern-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .modern-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px;
  }
}

.media-card {
  position: relative;
  background: #f3eee9;
  border-radius: var(--radius-card);
-overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid #ffffff;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.media-card img.loaded {
  opacity: 1;
}

.media-card .video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Floating Bottom Navigation Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 230, 225, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  max-width: 92vw;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.nav-item.active {
  background: var(--pastel-peach);
  color: var(--text-primary);
}

/* Lightbox Cinema Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(20, 22, 30, 0.96);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  user-select: none;
  touch-action: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) 24px 16px 24px;
  z-index: 10;
}

.lightbox-counter {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.lightbox-content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
}

.lightbox-stage {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img,
.lightbox-stage video {
  max-width: 100vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: none;
  color: #ffffff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

@media (max-width: 768px) {
  .lightbox-nav { display: none; }
}

.lightbox-footer {
  padding: 12px 24px calc(24px + env(safe-area-inset-bottom)) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 10;
}

.btn-pastel-download {
  background: linear-gradient(135deg, var(--pastel-pink) 0%, var(--pastel-peach) 100%);
  color: var(--text-primary);
  border: none;
  padding: 12px 26px;
  border-radius: 35px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(232, 165, 152, 0.4);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.btn-pastel-download:active {
  transform: scale(0.96);
}

/* PWA Prompts */
.pwa-prompt {
  position: fixed;
  bottom: calc(85px + env(safe-area-inset-bottom));
  left: 20px;
  right: 20px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 750;
  background: var(--bg-card);
  border: 1px solid var(--pastel-peach);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pwa-prompt.hidden { display: none; }

.btn-pwa-install {
  background: var(--pastel-peach);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-pwa-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.ios-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.ios-modal.active {
  opacity: 1;
  visibility: visible;
}

.ios-card {
  background: var(--bg-card);
  border-radius: 28px 28px 0 0;
  padding: 32px 28px calc(28px + env(safe-area-inset-bottom)) 28px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.ios-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.ios-card ol {
  text-align: left;
  margin: 16px auto;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
