/* Wedding Camera Application - Complete Cross-Device Responsive CSS Design System */

:root {
  --primary-rose: #8B3A44;
  --primary-dark: #66252C;
  --rose-light: #F4E8E9;
  --accent-gold: #D4AF37;
  --accent-gold-light: #FBF4DE;
  --bg-cream: #FAF6F0;
  --card-bg: #FFFFFF;
  --text-primary: #2C2223;
  --text-muted: #786C6D;
  --border-subtle: #E8DDDA;
  --border-gold: rgba(212, 175, 55, 0.4);
  --shadow-sm: 0 4px 12px rgba(139, 58, 68, 0.06);
  --shadow-md: 0 8px 24px rgba(139, 58, 68, 0.12);
  --shadow-lg: 0 16px 40px rgba(139, 58, 68, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Strict Box Sizing & Body Guard against Horizontal Scroll & Zoom Bugs */
html, body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  background-color: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.5;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
  box-sizing: inherit;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

h1, h2, h3, .brand-title {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Base Layout Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-rose);
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-rose), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(139, 58, 68, 0.25);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0;
}

.brand-text p {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-rose);
}

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  padding: 9px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-rose), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(139, 58, 68, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 58, 68, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary-rose);
  color: var(--primary-rose);
}

.btn-outline:hover {
  background: var(--rose-light);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8860B);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Mobile Quick Action Hero Banner */
.mobile-hero-actions {
  padding: 14px 0 6px;
}

.mobile-action-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* Hero Title Banner */
.hero-banner {
  padding: 24px 0 16px;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  background: var(--rose-light);
  color: var(--primary-rose);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  border: 1px solid rgba(139, 58, 68, 0.15);
}

.hero-title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.hero-subtitle {
  font-size: clamp(13px, 2vw, 16px);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 20px;
}

/* Showcase Desktop / Tablet Grid */
.showcase-grid {
  display: grid;
  grid-template-columns: 270px 1fr 270px;
  gap: 20px;
  align-items: start;
  margin-bottom: 30px;
  width: 100%;
}

.how-it-works-card, .features-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  width: 100%;
}

.section-badge {
  background: var(--primary-rose);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-item, .feature-item {
  display: flex;
  gap: 10px;
}

.step-icon, .feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--rose-light);
  color: var(--primary-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.step-content h4, .feature-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.step-content p, .feature-text p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Phones Showcase Mockup Container */
.phones-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.phone-mockup {
  width: 220px;
  height: 450px;
  background: #111;
  border-radius: 32px;
  border: 6px solid #2A2A2A;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.phone-mockup.main-phone {
  width: 260px;
  height: 490px;
  border-width: 8px;
  border-color: #1a1a1a;
  z-index: 10;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.phone-notch {
  width: 80px;
  height: 16px;
  background: #000;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 50;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-cream);
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-camera-view {
  background: #000;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.camera-header {
  padding: 20px 12px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.couple-title-sm {
  font-size: 12px;
  font-weight: 700;
}

.camera-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay-frame {
  position: absolute;
  top: 46px;
  left: 10px;
  right: 10px;
  bottom: 80px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
}

.frame-watermark {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 16px;
  font-size: 9px;
  align-self: center;
}

.camera-controls {
  padding: 12px;
  z-index: 5;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  text-align: center;
}

.camera-modes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mode-item {
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.mode-item.active {
  color: var(--accent-gold);
  border-bottom: 2px solid var(--accent-gold);
}

.shutter-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: transparent;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.shutter-btn::after {
  content: '';
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50%;
}

.rec-timer-badge {
  background: #dc3545;
  color: #fff;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-camera-flip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.phone-gallery-view, .phone-people-view {
  padding: 20px 10px 10px;
  height: 100%;
}

.mini-gallery-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mini-grid-item {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.person-card-sm {
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.person-card-sm img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2px;
  border: 2px solid var(--primary-rose);
}

.person-card-sm h5 {
  font-size: 10px;
  font-weight: 700;
  margin: 0;
}

.person-card-sm p {
  font-size: 9px;
  color: var(--text-muted);
  margin: 0;
}

/* Dashboard Stats & QR Card Section */
.bottom-showcase-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.qr-stand-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.qr-stand-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-rose), var(--accent-gold));
}

.stand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-rose);
  margin-bottom: 8px;
}

.qr-box {
  background: #fff;
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  display: inline-block;
  margin: 6px 0;
}

.qr-box img {
  width: 120px;
  height: 120px;
  display: block;
}

.qr-tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.couple-stats-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  width: 100%;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-header h3 {
  font-size: 16px;
  color: var(--primary-rose);
  margin: 0;
}

.stats-counter-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  gap: 6px;
  flex-wrap: wrap;
}

.stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.stats-features-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill-tag {
  background: var(--bg-cream);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Gallery Section */
.gallery-section {
  padding: 30px 0;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 16px;
  scrollbar-width: none;
  width: 100%;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-chip.active, .filter-chip:hover {
  background: var(--primary-rose);
  color: #fff;
  border-color: var(--primary-rose);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  width: 100%;
}

.gallery-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  position: relative;
  width: 100%;
}

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

.card-media {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.card-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 3px 7px;
  border-radius: 14px;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-info {
  padding: 12px;
}

.uploader-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.uploader-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.uploader-name {
  font-size: 11px;
  font-weight: 700;
}

.card-timestamp {
  font-size: 9px;
  color: var(--text-muted);
  margin-left: auto;
}

.card-caption {
  font-size: 11px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.like-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.like-btn.liked {
  color: var(--primary-rose);
}

.delete-btn {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.delete-btn:hover {
  background: #dc3545;
  color: #ffffff;
}

/* Modals Engine - Perfectly Centered & Responsive */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--card-bg);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  position: relative;
  margin: auto;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary-rose);
  color: #ffffff !important;
  border: 2px solid #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-media-col {
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 50vh;
}

.modal-media-col img, .modal-media-col video {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
}

.modal-info-col {
  padding: 20px;
}

.led-wall-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0d0b0c;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: #fff;
}

.led-display-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

.led-photo {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.8);
  border: 3px solid var(--accent-gold);
}

.led-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.06);
  padding: 12px 16px;
  border-radius: 14px;
}

footer {
  background: #1E1A1B;
  color: #D6C7C8;
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 30px;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE ENGINE (Strictly prevents overflow & weirdness)
   ========================================================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .bottom-showcase-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Phones (iPhone & Android <= 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  /* Navbar Clean Mobile Layout */
  .navbar {
    padding: 10px 0;
  }

  .nav-links {
    display: none !important; /* Hide desktop nav links on small mobile screens */
  }

  .brand-text h1 {
    font-size: 14px;
  }

  .brand-text p {
    font-size: 9px;
  }

  .btn {
    padding: 7px 12px;
    font-size: 12px;
  }

  /* Poster Showcase Stacks Perfectly on Phone */
  .showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .phones-container {
    flex-direction: column;
    align-items: center;
  }

  .phone-mockup {
    display: none; /* Hide side mockups on mobile phones */
  }

  .phone-mockup.main-phone {
    display: block;
    width: 100%;
    max-width: 290px;
    height: 480px;
  }

  .bottom-showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .stats-counter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-num {
    font-size: 17px;
  }

  .stat-lbl {
    font-size: 9px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-media {
    height: 150px;
  }

  /* Modals on Mobile */
  .modal-container {
    width: 94%;
    max-width: 440px;
    padding: 20px;
  }

  .modal-close-btn {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .led-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
