/* ==========================================================================
   PARTNER CONTROLLER & MODERN ALBUM STYLES
   ========================================================================== */

:root {
    --romantic-pink: #ff4d6d;
    --romantic-rose: #ff758f;
    --romantic-light: #fff0f3;
    --romantic-dark: #590d22;
    --romantic-wine: #2b001a;
    --romantic-gold: #ffd166;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 77, 109, 0.2);
}

/* Ambient glow backdrop */
#ambient-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 77, 109, 0.08) 0%, rgba(138, 43, 226, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: pulseAmbient 12s ease-in-out infinite alternate;
}

@keyframes pulseAmbient {
    0% { transform: scale(1) rotate(0deg); opacity: 0.7; }
    100% { transform: scale(1.15) rotate(15deg); opacity: 1; }
}

.partner-album-wrapper {
    position: relative;
    z-index: 2;
    max-width: 1400px;
}

/* Top Hero & Header */
.album-hero {
    padding: 30px 15px 15px 15px;
}

.album-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    background: linear-gradient(135deg, #ff758f, #ffb3c1, #ffd166);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 77, 109, 0.4);
}

.album-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.35rem);
    color: #ffccd5;
}

.partner-name {
    color: var(--romantic-gold);
    font-weight: 600;
}

.badge-romantic {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 77, 109, 0.15);
    border: 1px solid rgba(255, 77, 109, 0.35);
    color: #ffccd5;
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
}

.badge-studio-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #c9184a, #ff4d6d);
    color: #ffffff !important;
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.35);
}

.badge-studio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 77, 109, 0.6);
}

/* Chapter Navigation Pills */
.chapter-nav-container {
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 77, 109, 0.4) transparent;
}

.chapter-pills-scroll {
    display: inline-flex;
    gap: 10px;
    padding: 5px;
}

.chapter-pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 35px;
    padding: 8px 18px;
    color: #ffccd5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.chapter-pill-btn .pill-number {
    font-size: 0.72rem;
    text-transform: uppercase;
    background: rgba(255, 77, 109, 0.25);
    color: #ff758f;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.chapter-pill-btn .pill-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.chapter-pill-btn .pill-music-icon {
    font-size: 0.75rem;
    color: var(--romantic-gold);
}

.chapter-pill-btn.active {
    background: linear-gradient(135deg, #c9184a, #ff4d6d);
    border-color: #ff758f;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 77, 109, 0.5);
}

.chapter-pill-btn.active .pill-number {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* View Mode Switcher */
.view-mode-group {
    background: rgba(255, 255, 255, 0.06);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-view-mode {
    border: none;
    color: #ffccd5;
    padding: 7px 16px;
    border-radius: 25px !important;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view-mode.active {
    background: rgba(255, 77, 109, 0.3);
    color: #ffffff;
}

/* Current Track Playing Badge */
.current-track-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 0, 30, 0.7);
    border: 1px solid rgba(255, 77, 109, 0.3);
    padding: 5px 14px;
    border-radius: 40px;
    backdrop-filter: blur(12px);
}

.vinyl-mini-spin {
    color: var(--romantic-gold);
    font-size: 1.3rem;
    line-height: 1;
}

.vinyl-mini-spin.spin {
    animation: rotateVinyl 3s linear infinite;
}

@keyframes rotateVinyl {
    100% { transform: rotate(360deg); }
}

.current-track-badge .track-label {
    font-size: 0.6rem;
    color: #ff758f;
    font-weight: 700;
}

.current-track-badge .track-name {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-track-play {
    background: var(--romantic-pink);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
}

/* Chapter Banner Card */
.chapter-banner-card {
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.08), rgba(26, 0, 48, 0.6));
    border: 1px solid rgba(255, 77, 109, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.chapter-ribbon {
    display: inline-block;
    background: linear-gradient(135deg, #c9184a, #ff4d6d);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chapter-heading {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
}

.chapter-subtext {
    color: #ffccd5;
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
}

.shayari-box {
    background: rgba(255, 77, 109, 0.08);
    border-left: 3px solid var(--romantic-pink);
    border-right: 3px solid var(--romantic-pink);
    display: inline-block;
    padding: 10px 22px;
    border-radius: 12px;
}

.quote-icon {
    color: var(--romantic-rose);
    font-size: 0.85rem;
    opacity: 0.7;
}

.shayari-text {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    color: #ffb3c1;
}

.chapter-stats {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ================= MODERN ALBUM CARDS & EFFECT STYLES ================= */
.album-card-col {
    perspective: 1000px;
}

.modern-album-card {
    position: relative;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--card-shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    overflow: hidden;
}

/* Photo Frame & Image */
.album-photo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
}

.album-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.photo-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.25s ease;
    z-index: 4;
}

.btn-card-expand {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-card-expand:hover {
    background: var(--romantic-pink);
    transform: scale(1.1);
}

.modern-album-card:hover .photo-card-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Effect 1: Polaroid Style — ALL cards use this */
.modern-album-card.effect-polaroid {
    background: #fffaf9;
    padding: 10px 10px 14px 10px;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Alternating gentle tilts for a natural scattered album look */
.masonry-item:nth-child(odd) .modern-album-card.effect-polaroid {
    transform: rotate(-1.2deg);
}
.masonry-item:nth-child(even) .modern-album-card.effect-polaroid {
    transform: rotate(1.2deg);
}

.modern-album-card.effect-polaroid .album-photo-frame {
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

.modern-album-card.effect-polaroid .album-polaroid-caption {
    background: transparent;
    padding: 10px 6px 4px 6px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-album-card.effect-polaroid .caption-text {
    color: #4a1a2a !important;
    font-family: 'Dancing Script', cursive;
    font-size: 1.05rem !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.modern-album-card.effect-polaroid:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.04) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 25px rgba(255,77,109,0.35);
    z-index: 10;
}

/* Captions (for non-polaroid fallback) */
.album-polaroid-caption {
    padding: 8px 6px 3px 6px;
    text-align: center;
}

.caption-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff0f3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.caption-date {
    font-size: 0.72rem;
    color: #ff758f;
}

/* Cinematic Video Cards */
.cinematic-video-card {
    background: rgba(10, 0, 20, 0.8);
    border: 1px solid rgba(255, 77, 109, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
}

.video-filmstrip-top, .video-filmstrip-bottom {
    display: flex;
    justify-content: space-around;
    padding: 5px;
    background: #111;
}

.video-filmstrip-top span, .video-filmstrip-bottom span {
    width: 14px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.video-wrapper video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* ================= 3D PHOTOBOOK SPREAD ================= */
.book-container {
    max-width: 1000px;
    margin: 0 auto;
    perspective: 1500px;
}

.book-spread {
    display: flex;
    background: #1f0d25;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8), 0 0 40px rgba(255, 77, 109, 0.2);
    border: 3px solid rgba(255, 77, 109, 0.3);
    overflow: hidden;
    min-height: 480px;
}

.book-page {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.book-left-page {
    background: linear-gradient(135deg, rgba(30, 10, 40, 0.95), rgba(45, 10, 50, 0.95));
    border-right: 2px solid rgba(255, 77, 109, 0.2);
}

.book-right-page {
    background: linear-gradient(135deg, rgba(40, 10, 45, 0.95), rgba(25, 5, 35, 0.95));
}

.book-chapter-tag {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--romantic-pink);
    font-weight: 700;
}

.book-subtitle {
    color: #ffccd5;
    font-size: 0.95rem;
}

.book-divider {
    font-size: 1.6rem;
    color: var(--romantic-pink);
    margin: 8px 0;
}

.book-shayari {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: var(--romantic-gold);
    line-height: 1.4;
}

.book-featured-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.btn-book-nav {
    background: rgba(255, 77, 109, 0.2);
    border: 1px solid rgba(255, 77, 109, 0.4);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.btn-book-nav:hover {
    background: var(--romantic-pink);
    color: #fff;
}

/* ================= MODERN ALBUM LIGHTBOX ================= */
.modern-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 100000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 0, 18, 0.94);
    backdrop-filter: blur(25px);
    z-index: 1;
}

.lightbox-ambient-aura {
    position: absolute;
    width: 60vw;
    height: 60vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 77, 109, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 2;
    pointer-events: none;
}

.lightbox-container {
    position: relative;
    z-index: 3;
    width: 94vw;
    max-width: 1150px;
    height: 92vh;
    display: flex;
    flex-direction: column;
}

/* Lightbox Header */
.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    flex-shrink: 0;
}

.lightbox-chapter-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.badge-lightbox-chapter {
    background: var(--romantic-pink);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.lightbox-counter {
    color: #ffccd5;
    font-size: 0.85rem;
    white-space: nowrap;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lb-tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.lb-tool-btn:hover, .lb-tool-btn.active {
    background: var(--romantic-pink);
    border-color: var(--romantic-pink);
}

.lb-close-btn {
    background: rgba(255, 77, 109, 0.25);
    border-color: var(--romantic-pink);
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox Main Stage */
.lightbox-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    padding: 0 10px;
}

.lb-nav-arrow {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.lb-nav-arrow:hover {
    background: var(--romantic-pink);
    transform: scale(1.12);
}

.lightbox-image-wrap {
    flex: 1;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6px;
    min-height: 0;
}

.lightbox-featured-img {
    max-width: 85%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(255, 77, 109, 0.3);
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.lightbox-featured-img.ken-burns-active {
    animation: kenBurnsModal 14s infinite alternate ease-in-out;
}

@keyframes kenBurnsModal {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.08) translate(-1.5%, 1%); }
    100% { transform: scale(1.04) translate(1.5%, -1%); }
}

.lightbox-caption-card {
    margin-top: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 20px;
    border-radius: 25px;
    max-width: 80%;
}

.lb-caption-text {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 2px;
    font-weight: 500;
}

.lb-caption-date {
    color: var(--romantic-rose);
    font-size: 0.75rem;
}

/* Lightbox Filmstrip Bar */
.lightbox-filmstrip-bar {
    height: 65px;
    padding: 6px 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.lightbox-filmstrip-bar::-webkit-scrollbar { display: none; }

.filmstrip-scroll {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.filmstrip-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    opacity: 0.45;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.filmstrip-thumb:hover {
    opacity: 0.85;
    transform: scale(1.06);
}

.filmstrip-thumb.active {
    opacity: 1;
    border-color: var(--romantic-pink);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--romantic-pink);
}

/* ================= FLOATING VINYL WIDGET ================= */
.floating-vinyl-widget {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #2b001a 20%, #111 60%, #000 100%);
    border-radius: 50%;
    border: 2px solid rgba(255, 77, 109, 0.5);
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vinyl-disc.playing {
    animation: rotateVinyl 4s linear infinite;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8), 0 0 25px rgba(255, 77, 109, 0.7);
}

.vinyl-center-label {
    width: 22px;
    height: 22px;
    background: #ff4d6d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.vinyl-audio-waves {
    position: absolute;
    top: -14px;
    right: -8px;
    display: none;
    gap: 3px;
    align-items: flex-end;
    height: 18px;
}

.vinyl-audio-waves.playing {
    display: flex;
}

.vinyl-audio-waves span {
    width: 3px;
    background: var(--romantic-gold);
    border-radius: 3px;
    animation: waveJump 1s ease-in-out infinite alternate;
}

.vinyl-audio-waves span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.vinyl-audio-waves span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.vinyl-audio-waves span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.vinyl-audio-waves span:nth-child(4) { height: 16px; animation-delay: 0.4s; }
.vinyl-audio-waves span:nth-child(5) { height: 8px; animation-delay: 0.15s; }

@keyframes waveJump {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* ================= PARTNER STUDIO STYLES ================= */
.partner-studio-container {
    max-width: 1200px;
}

.studio-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 77, 109, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.studio-nav-pills .nav-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffccd5;
    border-radius: 25px;
    padding: 8px 18px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.studio-nav-pills .nav-link.active {
    background: linear-gradient(135deg, #c9184a, #ff4d6d);
    border-color: #ff758f;
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.4);
}

.studio-input, .studio-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 14px;
}

.studio-input:focus, .studio-select:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--romantic-pink);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.35);
}

.studio-select option {
    background: #1a0020;
    color: #ffffff;
}

.manage-thumb-card {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.manage-thumb-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.badge-effect-tag {
    position: absolute;
    bottom: 24px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: var(--romantic-gold);
    font-size: 0.62rem;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.btn-delete-badge {
    background: rgba(200, 0, 50, 0.8);
    color: white;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    border: none;
}

.manage-caption-text {
    font-size: 0.75rem;
    color: #ffccd5;
}

.chapter-music-item, .chapter-admin-card, .video-preview-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   PERFECT MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Automatically hide global audio button & studio button when Lightbox is active */
body.lightbox-open #musicToggle,
body.lightbox-open .btn-mini-studio,
body.lightbox-open .floating-vinyl-widget {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide floating side arrows on tablet and mobile so they never cover photos */
@media (max-width: 991px) {
    .floating-side-nav {
        display: none !important;
    }
}

/* Tablet & Mobile Lightbox layout */
@media (max-width: 768px) {
    .book-spread {
        flex-direction: column;
    }
    .book-left-page {
        border-right: none;
        border-bottom: 2px solid rgba(255, 77, 109, 0.2);
    }

    .modern-lightbox-modal {
        padding: 0;
    }

    .lightbox-container {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        padding: 8px 10px;
        justify-content: space-between;
    }

    /* Clean, single-line header */
    .lightbox-header {
        padding: 4px 6px 8px 6px;
        flex-shrink: 0;
        gap: 6px;
    }

    .lightbox-chapter-info {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        flex-shrink: 1;
    }

    .badge-lightbox-chapter {
        font-size: 0.72rem;
        padding: 4px 10px;
        max-width: 130px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .lightbox-counter {
        font-size: 0.78rem;
        margin-left: 2px;
        white-space: nowrap;
    }

    .lightbox-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .lb-tool-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        margin-left: 2px;
    }

    .lb-close-btn {
        width: 32px;
        height: 32px;
    }

    /* Lightbox Stage & Centerpiece photo */
    .lightbox-stage {
        flex: 1;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
    }

    .lightbox-image-wrap {
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2px;
    }

    .lightbox-featured-img {
        max-height: 56vh;
        max-width: 95vw;
        object-fit: contain;
        border-radius: 8px;
    }

    /* Prev / Next arrows overlaid on photo edges */
    .lb-nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
        background: rgba(0, 0, 0, 0.65);
        border: 1px solid rgba(255, 255, 255, 0.25);
        z-index: 10;
    }
    .lb-prev-arrow { left: 4px; }
    .lb-next-arrow { right: 4px; }

    /* Compact Caption Card on Mobile */
    .lightbox-caption-card {
        margin-top: 8px;
        padding: 4px 14px;
        max-width: 92%;
        border-radius: 20px;
        background: rgba(15, 0, 25, 0.75);
    }

    .lb-caption-text {
        font-size: 0.85rem;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lb-caption-date {
        font-size: 0.7rem;
        display: block;
    }

    /* Bottom Filmstrip on Mobile */
    .lightbox-filmstrip-bar {
        height: 50px;
        padding: 4px 0;
        flex-shrink: 0;
    }

    .filmstrip-thumb {
        width: 42px;
        height: 42px;
        border-radius: 6px;
    }
}

/* Extra small mobile phones (< 576px) */
@media (max-width: 576px) {
    .badge-lightbox-chapter {
        max-width: 100px;
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .lightbox-featured-img {
        max-height: 52vh;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .chapter-heading {
        font-size: 1.8rem;
    }

    .chapter-subtext {
        font-size: 0.95rem;
    }

    .shayari-text {
        font-size: 1.25rem;
    }

    .masonry-item {
        padding: 3px !important;
    }

    .modern-album-card {
        border-radius: 8px;
    }

    .modern-album-card.effect-polaroid {
        padding: 5px 5px 8px 5px;
    }

    .album-polaroid-caption {
        padding: 4px 2px 2px 2px;
    }

    .caption-text {
        font-size: 0.78rem;
    }

    .caption-date {
        font-size: 0.65rem;
    }

    /* Chapter bottom navigation actions on mobile */
    .chapter-nav-actions .d-flex {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-nav-actions .d-flex > div {
        width: 100%;
    }

    .btn-flying-prev, .btn-flying-next {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Music button and mini studio button */
    .btn-music {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .btn-mini-studio {
        bottom: 16px;
        left: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}
