@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #0a0a0f 0%, #141428 100%);
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Header / Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 1.5rem 4%;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background: linear-gradient(135deg, #e50914, #b20710);
    padding: 0.6rem;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #e50914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

nav a:last-child {
    margin-right: 0;
}

nav a:hover {
    color: white;
}

nav a.active {
    color: white;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e50914;
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 75vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 0 4%;
    padding-bottom: 5rem;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg,
            #0a0a0f 0%,
            rgba(10, 10, 15, 0.8) 20%,
            rgba(10, 10, 15, 0.4) 50%,
            rgba(10, 10, 15, 0.2) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid rgba(229, 9, 20, 0.5);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e50914;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: black;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-play:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.02);
}

.btn-info {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(109, 109, 110, 0.7);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-info:hover {
    background: rgba(109, 109, 110, 0.5);
}

/* --- Content Rows --- */
.content-section {
    position: relative;
    padding: 0 4%;
    margin-top: -5rem;
    z-index: 20;
}

.row-container {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row-title .see-all {
    font-size: 0.85rem;
    color: #00f2ff;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.row-container:hover .see-all {
    opacity: 1;
}

/* --- Video Carousel --- */
.video-carousel {
    position: relative;
    overflow: visible;
}

.video-row {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.video-row::-webkit-scrollbar {
    display: none;
}

/* --- Video Card --- */
.video-card {
    flex-shrink: 0;
    width: 300px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #1a1a2e;
    transition: all 0.3s ease;
    transform-origin: center center;
}

.video-card:first-child {
    transform-origin: left center;
}

.video-card:last-child {
    transform-origin: right center;
}

.video-card:hover {
    transform: scale(1.3);
    z-index: 50;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.video-card video,
.video-card .thumbnail-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-card .thumbnail-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.video-card .thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 50%,
            rgba(0, 0, 0, 0.7) 100%);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Card Info Overlay (aparece no hover) */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(20, 20, 40, 1) 0%, transparent 100%);
    padding: 4rem 1rem 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.video-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-match {
    color: #46d369;
    font-weight: 600;
}

.card-year {
    color: rgba(255, 255, 255, 0.6);
}

.card-duration {
    color: rgba(255, 255, 255, 0.6);
}

.card-genre {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-buttons {
    display: flex;
    gap: 0.5rem;
}

.card-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(20, 20, 40, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.card-btn:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.card-btn.play-btn {
    background: white;
    color: black;
    border-color: white;
}

.card-btn.play-btn:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* Progress Bar */
.card-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.card-progress-bar {
    height: 100%;
    background: #e50914;
    width: 0%;
    transition: width 0.3s ease;
}

/* --- Carousel Navigation Arrows --- */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-carousel:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.left {
    left: -25px;
    border-radius: 0 4px 4px 0;
}

.carousel-arrow.right {
    right: -25px;
    border-radius: 4px 0 0 4px;
}

/* --- Video Modal (Netflix Style) --- */
#video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    background: #181818;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

#video-modal.active .modal-content {
    transform: scale(1);
}

.modal-video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-video-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(0deg, #181818 0%, transparent 100%);
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-info {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-match {
    color: #46d369;
    font-weight: 600;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
}

/* --- Footer Spacing --- */
.footer-spacer {
    height: 5rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
    .video-card {
        width: 260px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .hero-section {
        height: 60vh;
        min-height: 400px;
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.9rem;
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-play,
    .btn-info {
        width: 100%;
        justify-content: center;
    }

    .content-section {
        margin-top: -3rem;
    }

    .row-title {
        font-size: 1.1rem;
    }

    .video-card {
        width: 200px;
    }

    .video-card:hover {
        transform: scale(1.1);
    }

    .card-overlay {
        display: none;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .modal-info {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.4rem;
    }

    .carousel-arrow {
        display: none;
    }
}

/* --- TV / Large Screens --- */
@media (min-width: 2000px) {
    .hero-title {
        font-size: 5rem;
    }

    .video-card {
        width: 400px;
    }

    .row-title {
        font-size: 2rem;
    }
}

/* --- Loading State --- */
.loading-shimmer {
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}