/* ============================================
   MOBILE — Mobile-first enhancements
   ============================================ */

/* Progress bar (replaces dots on mobile) */
.progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 200;
  padding-top: var(--safe-top);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink-neon), var(--red-glow));
  box-shadow: 0 0 12px rgba(255, 107, 157, 0.6);
  transition: width 0.6s var(--ease-out-expo);
  border-radius: 0 2px 2px 0;
}

.page-counter {
  position: fixed;
  top: calc(0.75rem + var(--safe-top));
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  z-index: 200;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 100px;
}

/* Scrollable screens */
.screen--scrollable {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(7rem + var(--safe-bottom));
}

.screen--scrollable .screen-inner {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.scroll-hint {
  position: sticky;
  bottom: calc(5.5rem + var(--safe-bottom));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 107, 157, 0.6);
  padding: 0.5rem;
  pointer-events: none;
  animation: scrollHintBounce 2s ease-in-out infinite;
}

@keyframes scrollHintBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* Hero background on entrance */
.hero-bg {
  background-size: cover;
  background-position: center 15%;
  opacity: 0;
  transition: opacity 1.5s ease;
  filter: blur(8px) brightness(0.3);
}

.hero-bg.visible {
  opacity: 1;
}

.entrance-photo-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 3px solid rgba(255, 107, 157, 0.6);
  box-shadow: var(--glow-pink), 0 0 0 6px rgba(255, 107, 157, 0.12);
}

.entrance-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Full-bleed photo screens — poori photo dikhe, face crop na ho */
.screen--photo {
  padding: 0;
  align-items: stretch;
  overflow: hidden;
}

.photo-hero {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0509;
  overflow: hidden;
}

.photo-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  animation: photoRevealIn 1.2s var(--ease-out-expo) forwards;
}

@keyframes photoRevealIn {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

/* Subtle cinematic glow behind photo */
.photo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 51, 102, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.photo-hero-img {
  position: relative;
  z-index: 0;
}

.photo-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem calc(6rem + var(--safe-bottom));
  background: linear-gradient(transparent, rgba(26, 10, 18, 0.75) 35%, rgba(26, 10, 18, 0.95));
  text-align: center;
  z-index: 3;
}

.photo-tag {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
}

/* Photo carousel */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  margin: 1rem 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s var(--ease-out-expo);
  touch-action: pan-y pinch-zoom;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  height: 62dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 20px;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(26, 10, 18, 0.9));
  font-size: 0.875rem;
  text-align: left;
  border-radius: 0 0 20px 20px;
}

.carousel-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--pink-soft);
  margin-bottom: 0.25rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  padding: 0;
}

.carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pink-neon), var(--red-glow));
  box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(10, 5, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.lightbox.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: calc(1rem + var(--safe-top));
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--glow-pink), var(--shadow-soft);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--white-muted);
  text-align: center;
  max-width: 320px;
}

/* Quote carousel */
.quote-carousel {
  padding: 2rem 1.5rem;
  margin-top: 1rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--white-soft);
  text-align: center;
  transition: opacity 0.4s ease;
}

.quote-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quote-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--white-soft);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s;
}

.quote-btn:active {
  box-shadow: var(--glow-pink);
}

.quote-dots {
  display: flex;
  gap: 6px;
}

.quote-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.quote-dot.active {
  background: var(--pink-neon);
  box-shadow: 0 0 8px rgba(255, 107, 157, 0.6);
}

/* Open When cards */
.open-when-grid {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.open-when-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.open-when-card:active,
.open-when-card.open {
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow: var(--glow-pink);
}

.open-when-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 0.95rem;
}

.open-when-header span {
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.open-when-card.open .open-when-header span {
  transform: rotate(180deg);
}

.open-when-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out-expo), padding 0.3s;
  padding: 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--white-muted);
}

.open-when-card.open .open-when-body {
  max-height: 200px;
  padding: 0 1.25rem 1.25rem;
}

/* Music player */
.music-player {
  padding: 1.5rem;
  margin: 1rem 0;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.now-playing-art {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink-neon), var(--red-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--glow-pink);
  animation: spinSlow 8s linear infinite;
  animation-play-state: paused;
}

.music-player.playing .now-playing-art {
  animation-play-state: running;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.now-playing-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.now-playing-title {
  font-weight: 500;
  font-size: 1rem;
}

.now-playing-artist {
  font-size: 0.8rem;
  color: var(--white-muted);
}

.player-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.player-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink-neon), var(--red-glow));
  border-radius: 2px;
  transition: width 0.3s linear;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.player-btn {
  background: none;
  border: none;
  color: var(--white-soft);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s, color 0.2s;
}

.player-btn--main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-neon), var(--red-glow));
  font-size: 1.1rem;
  box-shadow: var(--glow-pink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn:active {
  transform: scale(0.92);
}

.playlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 0.875rem;
}

.playlist-item.active {
  border-color: rgba(255, 107, 157, 0.5);
  box-shadow: var(--glow-pink);
}

.playlist-item-num {
  color: var(--pink-soft);
  font-size: 0.75rem;
  width: 1.5rem;
}

.playlist-item-info {
  flex: 1;
  text-align: left;
}

.playlist-item-title {
  display: block;
  font-weight: 500;
}

.playlist-item-artist {
  font-size: 0.75rem;
  color: var(--white-muted);
}

/* Mini player (floating) */
.mini-player {
  position: fixed;
  bottom: calc(5.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  background: rgba(26, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  z-index: 150;
  max-width: calc(100% - 2rem);
  box-shadow: var(--shadow-soft);
  transition: opacity 0.4s, transform 0.4s;
}

/* Mini player (base — premium-ui.css overrides) */
.mini-player.hidden {
  opacity: 0;
  pointer-events: none;
}

.mini-player-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--pink-neon), var(--red-glow));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-player-btn svg {
  width: 16px;
  height: 16px;
}

.mini-player-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.mini-player-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-artist {
  font-size: 0.65rem;
  color: var(--white-muted);
}

/* Wishes cloud */
.wishes-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.wish-bubble {
  padding: 0.75rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--white-muted);
  animation: wishPop 0.6s var(--ease-out-expo) backwards;
  box-shadow: var(--shadow-soft);
}

@keyframes wishPop {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Swipe hint in nav */
.swipe-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.05em;
}

/* Nav adjustments for mobile */
@media (max-width: 480px) {
  .nav-controls {
    width: calc(100% - 1.5rem);
    justify-content: space-between;
    left: 0.75rem;
    right: 0.75rem;
    transform: none;
  }

  .nav-btn {
    width: 52px;
    height: 52px;
  }

  .title-xl {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  .forever-title {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .quote-text {
    font-size: 1.15rem;
  }

  .mini-player {
    bottom: calc(6rem + var(--safe-bottom));
  }

  .carousel-slide {
    max-height: 50dvh;
  }
}

@media (min-width: 768px) {
  .swipe-hint {
    display: none;
  }

  .scroll-hint {
    display: none;
  }
}

.hidden {
  display: none !important;
}

/* Hidden YouTube audio players */
#youtube-players {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  top: -9999px;
  left: -9999px;
}

.icon-play.hidden,
.icon-pause.hidden {
  display: none;
}
