* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #fff;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1000;
    transition: background 0.3s;
}

header.scrolled {
    background: rgba(0,0,0,0.95);
}

.logo {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(45deg, #e50914, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://wallpapercave.com/wp/wp1832232.jpg') center/cover;
    animation: zoomIn 20s ease-out infinite alternate;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%),
                linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 0 50px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5); }
    to { text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 30px rgba(0,0,0,0.8); }
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #fff;
}

.btn-play {
    background: #e50914;
    box-shadow: 0 4px 20px rgba(229,9,20,0.5);
}

.btn-play:hover {
    background: #ff0a16;
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(229,9,20,0.7);
}

/* Carousel Section */
.carousel-section {
    padding: 50px 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%);
}

.section-title {
    font-size: 28px;
    margin: 0 50px 30px;
    font-weight: bold;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.carousel {
    display: flex;
    gap: 15px;
    animation: scroll 7s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.carousel-item {
    flex-shrink: 0;
    width: 300px;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    border: 3px solid rgba(229, 9, 20, 0.6);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.carousel-item:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 10px 40px rgba(229,9,20,0.8), 0 0 30px rgba(229,9,20,0.6);
    z-index: 10;
    border-color: rgba(229, 9, 20, 1);
}

.carousel-item:hover img {
    transform: scale(1.1);
}

.carousel-item::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.carousel-item:hover::after {
    opacity: 1;
}

/* Grid Section */
.grid-section {
    padding: 80px 50px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-top: 50px;
}

.movie-card {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid rgba(229, 9, 20, 0.6);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    max-height: 500px;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(229,9,20,0.7), 0 0 25px rgba(229,9,20,0.5);
    z-index: 5;
    border-color: rgba(229, 9, 20, 1);
}

.movie-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.movie-card:hover .movie-info {
    transform: translateY(0);
}

.movie-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #181818;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.4s;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    position: relative;
    padding: 20px;
    text-align: right;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

@media (max-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    header, .hero-content, .section-title, .grid-section {
        padding-left: 20px;
        padding-right: 20px;
    }
}
/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff0a16;
}

/* Botón volver al inicio */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: bold;
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.5);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #ff0a16;
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.7);
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
    padding: 20px;
}

.page-btn {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(229, 9, 20, 0.6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 50px;
}

.page-btn:hover:not(:disabled) {
    background: #e50914;
    border-color: #e50914;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5);
}

.page-btn.active {
    background: #e50914;
    border-color: #e50914;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.5);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-btn {
        padding: 10px 15px;
        font-size: 14px;
        min-width: 40px;
    }
}
