/* Movies Page Styles */
.movies-page {
    width: 100%;
    background: #00031c;
    position: relative;
    overflow: hidden;
    padding: 0 60px; /* Matches header's .navbar and sliders */
}

.movies-title {
    color: var(--heading);
    font-size: 1.3rem;
    font-weight: 500;
    text-align: left;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 12px;
    box-sizing: border-box;
    padding: 15px 0;
}

.movie-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--background-item);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: cardEntrance 0.8s ease-out forwards;
}

/* Extend animation delays for up to 48 cards */
.movie-card[data-index="0"] { animation-delay: 0.1s; }
.movie-card[data-index="1"] { animation-delay: 0.2s; }
.movie-card[data-index="2"] { animation-delay: 0.3s; }
.movie-card[data-index="3"] { animation-delay: 0.4s; }
.movie-card[data-index="4"] { animation-delay: 0.5s; }
.movie-card[data-index="5"] { animation-delay: 0.6s; }
.movie-card[data-index="6"] { animation-delay: 0.7s; }
.movie-card[data-index="7"] { animation-delay: 0.8s; }
.movie-card[data-index="8"] { animation-delay: 0.9s; }
.movie-card[data-index="9"] { animation-delay: 1.0s; }
.movie-card[data-index="10"] { animation-delay: 1.1s; }
.movie-card[data-index="11"] { animation-delay: 1.2s; }
.movie-card[data-index="12"] { animation-delay: 1.3s; }
.movie-card[data-index="13"] { animation-delay: 1.4s; }
.movie-card[data-index="14"] { animation-delay: 1.5s; }
.movie-card[data-index="15"] { animation-delay: 1.6s; }
.movie-card[data-index="16"] { animation-delay: 1.7s; }
.movie-card[data-index="17"] { animation-delay: 1.8s; }
.movie-card[data-index="18"] { animation-delay: 1.9s; }
.movie-card[data-index="19"] { animation-delay: 2.0s; }
.movie-card[data-index="20"] { animation-delay: 2.1s; }
.movie-card[data-index="21"] { animation-delay: 2.2s; }
.movie-card[data-index="22"] { animation-delay: 2.3s; }
.movie-card[data-index="23"] { animation-delay: 2.4s; }
.movie-card[data-index="24"] { animation-delay: 2.5s; }
.movie-card[data-index="25"] { animation-delay: 2.6s; }
.movie-card[data-index="26"] { animation-delay: 2.7s; }
.movie-card[data-index="27"] { animation-delay: 2.8s; }
.movie-card[data-index="28"] { animation-delay: 2.9s; }
.movie-card[data-index="29"] { animation-delay: 3.0s; }
.movie-card[data-index="30"] { animation-delay: 3.1s; }
.movie-card[data-index="31"] { animation-delay: 3.2s; }
.movie-card[data-index="32"] { animation-delay: 3.3s; }
.movie-card[data-index="33"] { animation-delay: 3.4s; }
.movie-card[data-index="34"] { animation-delay: 3.5s; }
.movie-card[data-index="35"] { animation-delay: 3.6s; }
.movie-card[data-index="36"] { animation-delay: 3.7s; }
.movie-card[data-index="37"] { animation-delay: 3.8s; }
.movie-card[data-index="38"] { animation-delay: 3.9s; }
.movie-card[data-index="39"] { animation-delay: 4.0s; }
.movie-card[data-index="40"] { animation-delay: 4.1s; }
.movie-card[data-index="41"] { animation-delay: 4.2s; }
.movie-card[data-index="42"] { animation-delay: 4.3s; }
.movie-card[data-index="43"] { animation-delay: 4.4s; }
.movie-card[data-index="44"] { animation-delay: 4.5s; }
.movie-card[data-index="45"] { animation-delay: 4.6s; }
.movie-card[data-index="46"] { animation-delay: 4.7s; }
.movie-card[data-index="47"] { animation-delay: 4.8s; }

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.movie-card:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.movie-poster {
    position: relative;
}

.movie-poster img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.12);
    filter: brightness(0.65);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.vignette-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(to top, #00031c 30%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.movie-card:hover .vignette-card {
    opacity: 1;
}

.movie-title {
    color: var(--heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
    margin: 0 0 3px;
    opacity: 0;
    transform: translateY(-12px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.movie-card:hover .movie-title {
    transform: translateY(0);
    opacity: 1;
}

.movie-overview {
    color: var(--body);
    font-size: 0.65rem;
    line-height: 1.3;
    text-align: left;
    margin: 0;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.4s ease 0.1s, opacity 0.4s ease 0.1s;
}

.movie-card:hover .movie-overview {
    transform: translateY(0);
    opacity: 1;
}

.movie-meta {
    color: var(--body);
    font-size: 0.6rem;
    text-align: left;
    margin: 3px 0 0;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.4s ease 0.2s, opacity 0.4s ease 0.2s;
}

.movie-card:hover .movie-meta {
    transform: translateY(0);
    opacity: 1;
}

.movie-rating {
    position: absolute;
    top: 6px;
    right: 6px;
    color: var(--heading);
    font-size: 0.65rem;
    font-weight: 600;
    background: rgb(1 3 28 / 83%);
    padding: 2px 4px;
    border-radius: 50px;
    opacity: 1;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: var(--heading);
    background: var(--main);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: transform 0.4s ease 0.3s, opacity 0.4s ease 0.3s;
}

.play-button i {
    font-size: 1.2rem;
}

.movie-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.movie-actions {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}

.movie-card:hover .movie-actions {
    opacity: 1;
}

.action-button {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--body);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.action-button i {
    font-size: 0.9rem;
}

.action-button:hover, .action-button.active {
    background: var(--main);
    color: var(--heading);
    transform: rotate(360deg);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn.btn-secondary {
    background: var(--main);
    color: var(--heading);
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.btn.btn-secondary:hover {
    transform: scale(1.05);
}

.movies-no-content {
    color: var(--body);
    text-align: center;
    padding: 40px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 991px) {
    .movies-page {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .movies-page {
        padding: 0 10px;
    }
    .movie-overlay {
        padding: 12px; /* Slightly more padding for larger text */
    }
    .movie-title {
        font-size: 0.8rem; /* Increased from 0.7rem */
    }
    .movie-overview {
        font-size: 0.6rem; /* Increased from 0.5rem */
    }
    .movie-meta, .movie-rating {
        font-size: 0.55rem; /* Increased from 0.45rem */
    }
    .play-button {
        width: 35px; /* Increased from 32px */
        height: 35px;
    }
    .play-button i {
        font-size: 1rem; /* Increased from 0.9rem */
    }
    .action-button {
        width: 26px; /* Increased from 24px */
        height: 26px;
    }
    .action-button i {
        font-size: 0.85rem; /* Increased from 0.75rem */
    }
}

@media (max-width: 1600px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 1280px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 1024px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .movies-title {
        font-size: 1.4rem;
    }
    .movie-title {
        font-size: 0.8rem;
    }
    .movie-overview {
        font-size: 0.6rem;
    }
    .movie-meta, .movie-rating {
        font-size: 0.55rem;
    }
    .play-button {
        width: 38px;
        height: 38px;
    }
    .play-button i {
        font-size: 1.1rem;
    }
    .action-button {
        width: 28px;
        height: 28px;
    }
    .action-button i {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
    .movies-title {
        font-size: 1.2rem;
    }
    .movie-title {
        font-size: 0.75rem;
    }
    .movie-overview {
        font-size: 0.55rem;
    }
    .movie-meta, .movie-rating {
        font-size: 0.5rem;
    }
    .play-button {
        width: 35px;
        height: 35px;
    }
    .play-button i {
        font-size: 1rem;
    }
    .action-button {
        width: 26px;
        height: 26px;
    }
    .action-button i {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    .movies-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    .movie-overlay {
        padding: 12px; /* Slightly more padding for larger text */
    }
    .movie-title {
        font-size: 0.75rem; /* Increased from 0.65rem */
    }
    .movie-overview {
        font-size: 0.55rem; /* Increased from 0.45rem */
    }
    .movie-meta, .movie-rating {
        font-size: 0.5rem; /* Increased from 0.4rem */
    }
    .play-button {
        width: 32px; /* Increased from 30px */
        height: 32px;
    }
    .play-button i {
        font-size: 0.9rem; /* Increased from 0.8rem */
    }
    .action-button {
        width: 24px; /* Increased from 22px */
        height: 24px;
    }
    .action-button i {
        font-size: 0.8rem; /* Increased from 0.7rem */
    }
}