/* ========================================================
   11. BLUE WATERCOLOR THEME — POLISH & MICRO-INTERACTIONS
   ======================================================== */
.app-container {
  width: min(900px, 100vw);
  margin: 0 auto;
  padding: 20px 18px 60px;
  position: relative;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body:not(.invite-open):not(.invite-opening) .app-container {
  opacity: 0;
  transform: translateY(20px);
}

body.invite-opening .app-container,
body.invite-open .app-container {
  opacity: 1;
  transform: translateY(0);
}

/* Modal and Lightbox base rules — Elegant Transparent White Glass Theme */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
  overflow: hidden;
}

.lightbox-modal.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-sizing: border-box;
  z-index: 3005;
}

.lightbox-img-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.lightbox-modal img {
  display: block;
  max-width: min(88vw, 440px);
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(37, 71, 109, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 3.5px solid #ffffff;
  object-fit: contain;
  box-sizing: border-box;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.lightbox-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

.lightbox-counter {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(37, 71, 109, 0.12);
  color: #24466b;
  font-family: var(--font-title, 'Montserrat', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-shadow: none;
}

.lightbox-btn-step {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(37, 71, 109, 0.12);
  color: #24466b;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-btn-step:hover {
  background: #ffffff;
  color: #17365d;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(37, 71, 109, 0.18);
}

.lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(37, 71, 109, 0.12);
  color: #24466b;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3020;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: #ffffff;
  color: #e74c3c;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(37, 71, 109, 0.18);
}

.lightbox-nav-desktop {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(195, 215, 235, 0.85);
  box-shadow: 0 6px 18px rgba(37, 71, 109, 0.12);
  color: #24466b;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3010;
  transition: all 0.2s ease;
}

.lightbox-nav-desktop:hover {
  background: #ffffff;
  color: #17365d;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 8px 22px rgba(37, 71, 109, 0.2);
}

.lightbox-prev {
  left: -68px;
}

.lightbox-next {
  right: -68px;
}

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