/* ============================================
   SAGE EMPIRE — Theater Room Styles
   Fixed Billboard System v2.1
   ============================================ */

.theater-body {
    background: var(--deep-space);
}

/* ============================================
   BILLBOARD — The Hero Section
   ============================================ */
.billboard {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    border-bottom: 3px solid var(--aetherium-gold);
    background: linear-gradient(135deg, #1a1a2e 0%, #0B0C10 50%, #16213e 100%);
}

/* The image tag — THIS IS THE FIX */
.billboard-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    display: block;
    transition: opacity 1s ease-in-out;
}

/* Fallback gradient when image fails or loading */
.billboard-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #0B0C10 50%, #16213e 100%);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billboard-fallback::after {
    content: "SAGE EMPIRE THEATER";
    font-size: 3rem;
    color: var(--aetherium-gold);
    opacity: 0.15;
    letter-spacing: 8px;
    font-weight: bold;
}

/* Overlay with gradient for text readability */
.billboard-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(to top, 
        rgba(11, 12, 16, 0.98) 0%, 
        rgba(11, 12, 16, 0.8) 40%, 
        rgba(11, 12, 16, 0.3) 70%,
        transparent 100%);
    z-index: 2;
}

.billboard-info {
    max-width: 700px;
}

.billboard-category {
    display: inline-block;
    background: var(--aetherium-gold);
    color: var(--deep-space);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.billboard-info h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 0.75rem;
    color: var(--aetherium-gold);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    line-height: 1.1;
}

.billboard-info p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: 1rem;
    color: var(--clean-white);
    opacity: 0.9;
    line-height: 1.5;
    max-width: 600px;
}

.billboard-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--aetherium-gold);
    opacity: 0.8;
}

.billboard-meta span {
    border: 1px solid var(--aetherium-gold);
    padding: 0.2rem 0.6rem;
}

.billboard-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-play {
    background: var(--aetherium-gold);
    color: var(--deep-space);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-play:hover {
    background: #e0b86e;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.4);
}

.play-icon {
    font-size: 1rem;
}

.btn-info {
    background: transparent;
    color: var(--aetherium-gold);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--aetherium-gold);
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: var(--aetherium-gold);
    color: var(--deep-space);
}

/* Billboard Navigation Dots */
.billboard-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 3rem;
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.billboard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.3);
    border: 1px solid var(--aetherium-gold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.billboard-dot.active {
    background: var(--aetherium-gold);
    transform: scale(1.3);
}

.billboard-dot:hover {
    background: rgba(197, 160, 89, 0.6);
}

/* Billboard Nav Arrows */
.billboard-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 12, 16, 0.6);
    border: 1px solid var(--aetherium-gold);
    color: var(--aetherium-gold);
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billboard-nav:hover {
    background: var(--aetherium-gold);
    color: var(--deep-space);
}

.billboard-nav.prev { left: 1rem; }
.billboard-nav.next { right: 1rem; }

/* ============================================
   FILM GRID — Poster Cards
   ============================================ */
.film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.film-card {
    cursor: pointer;
    border: 1px solid rgba(197, 160, 89, 0.3);
    transition: all 0.3s ease;
    background: rgba(11, 12, 16, 0.8);
    overflow: hidden;
    position: relative;
}

.film-card:hover {
    transform: translateY(-5px);
    border-color: var(--aetherium-gold);
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.2);
}

.film-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(11,12,16,0.9) 0%, transparent 50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.film-card:hover::before {
    opacity: 1;
}

.film-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.film-card:hover img {
    transform: scale(1.05);
}

.film-info {
    padding: 1rem;
    background: rgba(11, 12, 16, 0.95);
    border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.film-info h3 {
    font-size: 1rem;
    color: var(--aetherium-gold);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.film-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--clean-white);
    opacity: 0.7;
}

.film-meta .year {
    color: var(--aetherium-gold);
}

.film-meta .status {
    text-transform: capitalize;
}

.film-meta .status.now_showing {
    color: var(--system-green);
}

.film-meta .status.coming_soon {
    color: var(--amber-warning);
}

/* ============================================
   VIDEO MODAL
   ============================================ */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.98);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-modal.active {
    display: flex;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: var(--deep-space);
    border: 2px solid var(--aetherium-gold);
}

.video-title-bar {
    padding: 1rem 1.5rem;
    background: rgba(197, 160, 89, 0.1);
    border-bottom: 1px solid var(--aetherium-gold);
    color: var(--aetherium-gold);
    font-size: 1.1rem;
    font-weight: bold;
}

.close-modal {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: var(--aetherium-gold);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--doctor-crimson);
}

video {
    width: 100%;
    display: block;
    max-height: 80vh;
}

/* ============================================
   INFO MODAL
   ============================================ */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.95);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.info-modal.active {
    display: flex;
}

.info-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--deep-space);
    border: 2px solid var(--aetherium-gold);
    padding: 2rem;
}

.info-content h2 {
    color: var(--aetherium-gold);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.info-content .info-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--aetherium-gold);
}

.info-content .info-meta span {
    border: 1px solid var(--aetherium-gold);
    padding: 0.2rem 0.6rem;
}

.info-content p {
    color: var(--clean-white);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.info-content .info-actions {
    display: flex;
    gap: 1rem;
}

/* ============================================
   LOADING / ERROR STATES
   ============================================ */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--aetherium-gold);
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(197, 160, 89, 0.3);
    border-top-color: var(--aetherium-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--doctor-crimson);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .billboard {
        height: 50vh;
        min-height: 300px;
    }

    .billboard-overlay {
        padding: 1.5rem;
    }

    .billboard-info h2 {
        font-size: 1.8rem;
    }

    .billboard-controls {
        gap: 0.5rem;
    }

    .btn-play, .btn-info {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .billboard-nav {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .film-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .video-modal {
        padding: 0.5rem;
    }

    .video-container {
        border: none;
    }
}

@media (max-width: 480px) {
    .billboard {
        height: 45vh;
        min-height: 250px;
    }

    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .filter-tabs {
        gap: 0.3rem;
    }

    .tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}
