/* Movie catalogue page styles */
:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --text: #ffffff;
    --muted: #d1d5db;
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.86)), url('../../images/pintoflix.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.overlay {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(229, 9, 20, 0.22), transparent 30%);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    padding: 20px clamp(20px, 5vw, 72px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.05));
}

.logo {
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo img {
    height: 48px;
    width: auto;
}

.movies-link {
    text-decoration: none;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    transition: color 0.2s ease;
}

.movies-link:hover {
    color: var(--primary);
}

.movie-section {
    padding: 120px clamp(18px, 5vw, 72px) 64px;
}

.movie-section::before {
    content: 'Movies';
    display: block;
    margin-bottom: 28px;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.movie-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 34px 22px;
}

.movie-item {
    cursor: pointer;
    text-align: center;
}

.movie-item img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.movie-item:hover img {
    transform: translateY(-8px) scale(1.03);
    filter: brightness(1.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.movie-item p {
    margin: 12px 0 0;
    min-height: 42px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.movie-details {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30;
    justify-content: center;
    align-items: center;
    padding: 24px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(8px);
}

.movie-details-content {
    position: relative;
    max-width: 680px;
    width: 100%;
    padding: 34px;
    border-radius: 18px;
    background: #161616;
    border: 1px solid var(--card-border);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.movie-details h2 {
    margin-top: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.movie-details p {
    color: var(--muted);
    line-height: 1.7;
}

.movie-details .close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text);
}

.movie-details button {
    border: none;
    padding: 13px 22px;
    color: var(--text);
    background: var(--primary);
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.movie-details button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .header {
        padding: 16px 20px;
    }

    .logo {
        gap: 18px;
    }

    .logo img {
        height: 36px;
    }

    .movie-section {
        padding: 96px 16px 42px;
    }

    .movie-row {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 26px 14px;
    }
}
