* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #e50914;
    --text-dark: #000;
    --text-light: #fff;
    --border-color: #333;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

/* HEADER */
.header {
    text-align: center;
    padding: 12px 0;
    background: linear-gradient(90deg, #e50914 0%, #b20710 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.title {
    font-family: 'Bebas Neue', cursive;
    font-size: 4.5rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
}

.datetime {
    font-size: 1.1rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

/* GRID FILM */
.grid-container {
    display: grid;
    grid-template-columns: 65% 35%;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    flex: 1;
    padding: 0 10px 10px 10px;
    overflow: hidden;
    min-height: 0;
}

/* 4 film: 1 grande + 3 a destra */
.grid-container.films-4 {
    grid-template-rows: 1fr 1fr 1fr;
}

/* 5 film: 1 grande + 4 a destra */
.grid-container.films-5 {
    grid-template-rows: 1fr 1fr 1fr 1fr;
}

/* BASE FILM CARD */
.film-card {
    background: linear-gradient(145deg, #222, #1a1a1a);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    position: relative;
    display: flex;
}

/* FEATURED FILM (Left Column, Full Height) */
.film-featured {
    grid-column: 1;
    grid-row: 1 / -1;
    /* Spans all rows (full height) */
    display: flex;
    flex-direction: row;
    /* Image Left, Info Right */
}

.film-in-onda {
    border: 4px solid #4CAF50;
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.4);
}

/* Featured Poster */
.film-featured .film-poster {
    width: 40%;
    /* Fixed width for poster partition */
    height: 100%;
    object-fit: contain;
    /* Show FULL poster */
    background-color: #000;
    border-right: 1px solid #333;
}

/* Featured Info */
.film-featured .film-info {
    width: 60%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Align text left */
    background: linear-gradient(to right, #1a1a1a, #252525);
}

.film-featured .film-title {
    font-size: 4rem;
    /* Very large title */
    line-height: 1;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.film-featured .showtime {
    font-size: 2rem;
    padding: 15px 30px;
    border-radius: 12px;
}

.film-featured .showtime-label {
    font-size: 1.2rem;
}

/* SIDE FILMS (Right Column, Stacked) */
.film-card:not(.film-featured) {
    grid-column: 2;
    /* Rows populated automatically: 1 then 2 */
    flex-direction: row;
}

.film-card:not(.film-featured) .film-poster {
    width: 40%;
    height: 100%;
    min-width: 150px;
    object-fit: contain;
    background-color: #000;
}

.film-card:not(.film-featured) .film-info {
    width: 60%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.film-card:not(.film-featured) .film-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.film-card:not(.film-featured) .showtime {
    font-size: 1.2rem;
    padding: 10px 15px;
}

/* COMMON STYLES */
.film-poster {
    display: block;
    transition: transform 0.5s;
}

.film-title {
    font-family: 'Bebas Neue', cursive;
    text-transform: uppercase;
    color: #fff;
}

.showtime {
    background: #e50914;
    color: white;
    font-weight: bold;
    display: inline-block;
    border-radius: 8px;
}

.film-showtimes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* BADGE */
/* BADGE */
.in-onda-badge {
    /* Position removed to flow naturally */
    display: inline-block;
    /* Makes it respect padding/margins but sit in flow */
    align-self: flex-start;
    font-size: 1.5rem;
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
    animation: pulse 2s infinite;
    margin-bottom: 20px;
    /* Add space below badge so title isn't crowded */
}

/* FOOTER */
.footer {
    padding: 15px 20px;
    background: linear-gradient(90deg, #2a2a2a 0%, #1f1f1f 100%);
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    flex-shrink: 0;
    margin-top: 10px;
}

.price-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.price-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-label {
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

.price-value {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.8rem;
    color: #4CAF50;
    font-weight: 700;
}

.footer-note {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 5px;
}

/* STATUS TEXT (In Info Section) */
.status-text {
    color: #4CAF50;
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: 'Bebas Neue', cursive;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: text-pulse 2s infinite;
}

@keyframes text-pulse {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }

    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
}

.price-divider {
    opacity: 0.3;
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .grid-container {
        grid-template-columns: 50% 50%;
    }
}

@media (max-width: 900px) {
    .container {
        height: auto;
        overflow-y: auto;
    }

    .grid-container {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .film-card {
        flex-direction: column;
        width: 100%;
        min-height: auto;
        margin-bottom: 20px;
    }

    .film-featured,
    .film-card:not(.film-featured) {
        flex-direction: column;
    }

    .film-poster {
        width: 100% !important;
        height: 400px !important;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .film-info {
        width: 100% !important;
    }
}

/* BANNER PROSSIMAMENTE */
.prossimamente-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(90deg, #e50914, #b0070f);
    padding: 14px 30px;
    border-radius: 6px;
    margin: 0 10px 10px 10px;
    flex-shrink: 0;
}

.prossimamente-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 4px;
    color: #fff;
}

.prossimamente-data {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.85);
}

.future-date-badge {
    display: inline-block;
    background: #e50914;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Card laterali più compatte con 4 film totali */
.films-4 .film-card:not(.film-featured) .film-title {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.films-4 .film-card:not(.film-featured) .film-info {
    padding: 14px;
}

.films-4 .film-card:not(.film-featured) .showtime {
    font-size: 1rem;
    padding: 6px 10px;
}

.films-4 .film-card:not(.film-featured) .in-onda-badge {
    font-size: 1rem;
    padding: 5px 10px;
    margin-bottom: 8px;
}

/* Card laterali ancora più compatte con 5 film totali */
.films-5 .film-card:not(.film-featured) .film-title {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.films-5 .film-card:not(.film-featured) .film-info {
    padding: 10px;
}

.films-5 .film-card:not(.film-featured) .showtime {
    font-size: 0.9rem;
    padding: 5px 8px;
}

.films-5 .film-card:not(.film-featured) .in-onda-badge {
    font-size: 0.85rem;
    padding: 4px 8px;
    margin-bottom: 6px;
}

.films-5 .film-card:not(.film-featured) .film-poster {
    min-width: 100px;
}