@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* NOISE */
.noise::before {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    content: "";
    opacity: .027;
    background: url(https://bigtwistph.github.io/tumblr_widgets/noise.gif);
    z-index: -1;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    padding: 20px;
    max-width: 900px;
    margin: auto;
    background-image: url('/films/sandy/sandy-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
}

/* --- FLOATING MUSIC PLAYER (simplified, upper right) --- */
.floating-player {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 30px !important;
    padding: 8px 16px 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-family: 'IBM Plex Mono', monospace !important;
    user-select: none !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    float: none !important;
    clear: both !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

/* Compressed state when scrolled */
.floating-player.compressed {
    padding: 6px 12px 6px 10px !important;
    gap: 6px !important;
    border-radius: 25px !important;
}

.floating-player.compressed .now-playing-wrapper {
    max-width: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.floating-player.compressed .player-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

.floating-player.compressed .player-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.now-playing-wrapper {
    overflow: hidden !important;
    max-width: 200px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.now-playing-text {
    font-size: 13px !important;
    color: white !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px !important;
    display: inline-block !important;
    animation: marquee 10s linear infinite !important;
    animation-play-state: paused !important;
    padding-right: 20px !important;
}

/* Only animate if text overflows */
.now-playing-text.marquee {
    animation-play-state: running !important;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause marquee on hover */
.floating-player:hover .now-playing-text.marquee {
    animation-play-state: paused !important;
}

.player-btn {
    background: transparent !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    border-radius: 50% !important;
    transition: all 0.2s !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    min-width: 28px !important;
    min-height: 28px !important;
}

.player-btn:hover {
    opacity: 0.7 !important;
    transform: scale(1.05) !important;
}

.player-btn:active {
    transform: scale(0.9) !important;
}

/* Mobile Responsive */
@media (max-width: 550px) {
    .floating-player {
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
        padding: 6px 12px 6px 8px !important;
        gap: 6px !important;
    }
    .now-playing-wrapper {
        max-width: 120px !important;
    }
    .now-playing-text {
        font-size: 11px !important;
    }
    .player-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
    }
    .player-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    .floating-player.compressed .now-playing-wrapper {
        max-width: 0 !important;
    }
    .floating-player.compressed {
        padding: 5px 10px 5px 8px !important;
    }
}
/* LOGO */
#siteLogo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}
#siteLogo img {
    width: 100%;
    max-width: 100px;
    height: auto;
}

/* NAVBAR */
#topNav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}
.navLink {
    text-decoration: none;
    color: white;
    cursor: pointer;
    display: inline-block;
    padding: 6px 0;
}
.navLink:hover {
    background-image: url('/logo/gradient.gif');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.navLink .nav-icon {
    display: none;
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.navLink .nav-text {
    display: inline;
}
.navLink .material-symbols-outlined {
    display: none;
    font-size: 28px;
    color: white;
}

/* FOOTER */
#siteFooter {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    background-image: url('/films/sandy/sandy-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    border-top: 1px solid rgba(255,255,255,0.4);
}

/* MODALS */
#trailerModal, #galleryModal, #videoModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 2000;
}
#trailerModal.active, #galleryModal.active, #videoModal.active {
    opacity: 1;
    pointer-events: auto;
}

#trailerContent, #galleryContent, #videoContent {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}
#trailerContent {
    padding: 50px 25px 25px 25px;
    transform: translateY(60px);
    transition: transform 0.18s ease;
}
#trailerModal.active #trailerContent {
    transform: translateY(0);
}

#closeTrailer, #closeGallery, #closeVideo {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    color: black;
    z-index: 10;
    background: none;
    padding: 0 4px;
}
#closeTrailer:hover, #closeGallery:hover, #closeVideo:hover {
    color: transparent;
    background-image: url('/logo/gradient.gif');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.2s ease;
}

.videoWrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scrollableGrid {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-top: 25px;
    padding-right: 12px;
    box-sizing: content-box;
}

/* GALLERY GRID */
.galleryGrid, .videoGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.galleryGrid img, .videoGrid img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 8px;
    object-fit: cover;
}
.galleryGrid a, .videoGrid a {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.galleryGrid a::before, .videoGrid a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-image: url('/logo/gradient.gif');
    background-size: cover;
    background-position: center;
    z-index: 1;
    pointer-events: none;
}
.galleryGrid a:hover::before, .videoGrid a:hover::before {
    opacity: 1;
}
.galleryGrid a img, .videoGrid a img {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    height: auto;
}
.galleryGrid a:hover img, .videoGrid a:hover img {
    transform: scale(0.92);
}

/* Video title overlay */
.videoGrid .video-title {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 14px;
    font-weight: 400;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 3;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.5px;
}
.videoGrid a:hover .video-title {
    opacity: 1;
    transform: translateY(0);
}

/* POLAROID ROW */
.polaroid-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px 0;
    flex-wrap: wrap;
    min-height: 300px;
}
.polaroid-item {
    flex: 0 0 auto;
    width: 25vh;
    background: white;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-radius: 4px;
    transition: transform 0.1s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.1s ease;
    cursor: pointer;
}
.polaroid-item:nth-child(1) { transform: rotate(-4deg) translateY(-5px); }
.polaroid-item:nth-child(2) { transform: rotate(6deg) translateY(8px); }
.polaroid-item:nth-child(3) { transform: rotate(-2deg) translateY(-3px); }
.polaroid-item:hover {
    transform: scale(1) translateY(-10px) !important;
    box-shadow: 0 12px 35px rgba(0,0,0,0.5);
    z-index: 10;
}
.polaroid-image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 2px;
    background: #f0f0f0;
}
.polaroid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.polaroid-item:hover .polaroid-image img {
    transform: none;
}

/* BUTTONS */
.button-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 30px 0;
    padding: 10px 0;
}
.custom-btn {
    display: inline-block;
    padding: 30px 100px;
    background: #ff6b9d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    font-weight: 400;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.custom-btn:hover {
    transform: translateY(-3px);
    background: #ff5788;
}
.custom-btn:active {
    transform: translateY(0px);
}

/* SOCIAL MEDIA */
.social-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 25px 0 80px 0;
    padding: 10px 0;
}
.social-link {
    color: #ff6b9d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    text-decoration: none;
}
.social-link:hover {
    opacity: 0.7;
}
.social-link svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* SCREENINGS MODAL */
#screeningsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 2000;
}

#screeningsModal.active {
    opacity: 1;
    pointer-events: auto;
}

#screeningsContent {
    position: relative;
    width: 90%;
    max-width: 550px;
    background: white;
    padding: 35px 30px 30px 30px;
    border-radius: 12px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(30px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#screeningsModal.active #screeningsContent {
    transform: translateY(0);
}

#closeScreenings {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    background: none;
    border: none;
    padding: 0 4px;
    transition: color 0.2s ease;
}

#closeScreenings:hover {
    color: transparent;
    background-image: url('/logo/gradient.gif');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.2s ease;
}

/* Screening Items */
.screenings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px 0 10px 0;
}

.screening-item {
    padding: 18px 20px;
    border: 2px solid #ff6b9d;
    border-radius: 10px;
    background: #fff5f8;
}


.screening-status {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ff6b9d;
    border: 2px solid #ff6b9d;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: center;
}

.screening-festival {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.screening-datetime {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #555;
    margin-bottom: 4px;
}

.screening-location {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    color: #777;
    margin-bottom: 12px;
}

/* Screening Links Row */
.screening-links {
    display: flex;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 107, 157, 0.2);
}

.screening-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #ff6b9d;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.screening-link:hover {
    background: #ff6b9d;
    color: white;
    transform: translateY(-1px);
}

.screening-link-remind {
    color: #ff6b9d;
}

.screening-link-info {
    color: #666;
}

.screening-link-info:hover {
    background: #666;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    #screeningsContent {
        max-width: 75%;
        padding: 30px 25px 25px 25px;
    }
}

@media (max-width: 600px) {
    #screeningsContent {
        max-width: 75%;
        padding: 25px 20px 20px 20px;
    }
    
    .screening-item {
        padding: 14px 16px;
    }
    
    .screening-festival {
        font-size: 14px;
    }
    
    .screening-datetime,
    .screening-location {
        font-size: 12px;
    }
    
    .screening-status {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .screening-links {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .screening-link {
        font-size: 12px;
        padding: 4px 6px;
    }
    
    .screenings-list {
        padding: 25px 0 10px 0; /* More top padding on mobile */
    }
}

@media (max-width: 400px) {
    #screeningsContent {
        max-width: 75%;
        padding: 20px 15px 15px 15px;
    }
    
    .screening-item {
        padding: 12px 14px;
    }
    
    .screening-festival {
        font-size: 13px;
    }
    
    .screening-datetime,
    .screening-location {
        font-size: 11px;
    }
    
    .screening-links {
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* SCROLLBAR */
.scrollableGrid::-webkit-scrollbar { width: 8px; }
.scrollableGrid::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); border-radius: 4px; }
.scrollableGrid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; transition: background 0.2s ease; }
.scrollableGrid::-webkit-scrollbar-thumb:hover { background-image: url('/logo/gradient.gif'); background-size: cover; background-position: center; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .polaroid-item { width: 20vh; padding: 10px 10px 32px 10px; }
    .polaroid-row { gap: 20px; min-height: 250px; }
    .galleryGrid, .videoGrid { grid-template-columns: repeat(2, 1fr); }
    .videoGrid .video-title { font-size: 12px; bottom: 15px; }
}
@media (max-width: 600px) {
    #siteFooter { font-size: 13px; gap: 8px; padding: 12px 15px; flex-wrap: wrap; }
    #siteLogo img { max-width: 85px; }
    .navLink .nav-icon { display: block; }
    .navLink .nav-text { display: none; }
    .navLink .material-symbols-outlined { display: inline-block; }
    #topNav { font-size: 0; grid-template-columns: 1fr 1fr 1fr 1fr; }
    .navLink:hover { background-image: none; color: white; opacity: 0.7; }
    .navLink:hover .material-symbols-outlined { opacity: 0.7; }
    .social-row { gap: 15px; margin: 20px 0 70px 0; }
    .social-link svg { width: 24px; height: 24px; }
    .custom-btn { padding: 20px 40px; font-size: 15px; min-width: 160px; }
    .button-section { gap: 10px; margin: 20px 0; }
    body {
        padding-bottom:25px; /* More space on mobile since footer is taller */
    }
}
@media (max-width: 480px) {
    .polaroid-item { width: 18vh; padding: 8px 8px 28px 8px; }
    .polaroid-row { gap: 15px; min-height: 200px; padding: 10px 0; }
        body {
        padding-bottom:25px; /* More space on mobile since footer is taller */
    }
}
@media (max-width: 450px) {
    .galleryGrid, .videoGrid { grid-template-columns: 1fr; }
    .videoGrid .video-title { font-size: 14px; bottom: 18px; }
        body {
        padding-bottom:25px; /* More space on mobile since footer is taller */
    }
}
@media (max-width: 400px) {
    .social-row { gap: 12px; margin: 15px 0 60px 0; }
    .social-link svg { width: 20px; height: 20px; }
    .custom-btn { padding: 8px 20px; font-size: 12px; min-width: 140px; }
    body {
        padding-bottom: 25px; /* More space on mobile since footer is taller */
    }
}