:root {
    --bg-color: #050810;
    --prime-blue: #00A8E1;
    --prime-blue-hover: #0087b5;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --header-height: 70px;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.5;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

/* Header Styles */
.header {
    height: var(--header-height);
    padding: 0 4%;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(5, 8, 16, 0.8) 0%, transparent 100%);
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: #050810;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    cursor: pointer;
    margin-right: 40px;
}

.logo-red {
    color: var(--prime-blue);
    /* Prime colors for Dramaflix logo name */
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-white);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-actions i {
    font-size: 18px;
    cursor: pointer;
    color: var(--text-white);
}

.profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Section */
.hero {
    height: 100vh;
    padding-left: 4%;
    display: flex;
    align-items: center;
    position: relative;
    background: url('poster.jpg') center top/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(5, 8, 16, 0.9) 10%, rgba(5, 8, 16, 0.4) 50%, rgba(5, 8, 16, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Adjust overlay specifically for mobile */
@media (max-width: 768px) {
    .hero::before {
        background: rgba(5, 8, 16, 0.7);
        /* Solid dark tint on mobile to fight high key images */
    }
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(5, 8, 16, 0.8) 40%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-weight: 800;
}

.top-badge .number {
    font-size: 28px;
    color: var(--prime-blue);
    line-height: 1;
    border: 2px solid var(--prime-blue);
    padding: 2px 8px;
    border-radius: 4px;
}

.top-badge .text {
    font-size: 14px;
    letter-spacing: 1px;
}

.movie-title {
    font-size: clamp(48px, 8vw, 84px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to right, #fff, var(--prime-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.movie-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-weight: 600;
}

.rating {
    color: #46d369;
}

.classification {
    background-color: #e59d1a;
    /* Orange for Age 14 in Brazil */
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 800;
}

.quality {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0 6px;
    border-radius: 2px;
    font-size: 12px;
}

.description {
    font-size: 18px;
    color: var(--text-white);
    margin-bottom: 30px;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 1), 0 0 5px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    touch-action: manipulation;
}

.btn-play {
    background-color: var(--text-white);
    color: #000;
}

.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.05);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: var(--text-white);
}

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.btn-cast {
    background-color: transparent;
    border: 2px solid var(--prime-blue);
    color: var(--prime-blue);
}

.btn-cast:hover {
    background-color: var(--prime-blue);
    color: #fff;
    box-shadow: 0 0 20px var(--prime-blue);
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 30px;
    cursor: pointer;
    color: white;
    z-index: 2001;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    transform: scale(1.2);
    color: var(--prime-blue);
}

.video-container {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 50px rgba(0, 168, 225, 0.3);
    position: relative;
    background: #000;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer Styles */
.footer {
    padding: 60px 4% 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer .logo {
    margin-right: 0;
    font-size: 24px;
}

.copyright {
    color: var(--text-gray);
    font-size: 14px;
    letter-spacing: 1px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .movie-title {
        font-size: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 15px;
        font-size: 16px;
    }

    .description {
        font-size: 16px;
        text-align: left;
    }
}

/* New Movie Details Styles */
.movie-details {
    padding: 60px 4%;
    background: linear-gradient(to bottom, transparent, rgba(0, 168, 225, 0.05));
}

.details-nav {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

.details-nav a {
    text-decoration: none;
    color: var(--text-gray);
    padding: 15px 0;
    font-weight: 600;
    position: relative;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.details-nav a.active,
.details-nav a:hover {
    color: var(--text-white);
}

.details-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--prime-blue);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

.details-row {
    display: flex;
    gap: 100px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .details-row {
        flex-direction: column;
        gap: 40px;
    }

    .hero {
        padding-top: 45vh;
        align-items: flex-start;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        padding-bottom: 100px;
    }

    .movie-title {
        font-size: 3rem;
    }

    .details-nav {
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

.details-col {
    flex: 1;
}

.movie-details h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.movie-details p {
    color: var(--text-gray);
    font-size: 18px;
    line-height: 1.6;
}

.meta-item {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.meta-item .label {
    color: var(--text-gray);
    font-weight: 600;
}

.meta-item {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-item .label {
    color: var(--text-gray);
    font-weight: 600;
    min-width: 100px;
}

.meta-item .value {
    flex: 1;
    min-width: 200px;
}

.cast-section h3 {
    margin-bottom: 30px;
}

.cast-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.cast-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    min-width: fit-content;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.cast-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--prime-blue);
    transform: translateY(-5px);
}

.cast-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.cast-info {
    display: flex;
    flex-direction: column;
}

.cast-info .name {
    font-weight: 700;
}

.cast-info .role {
    font-size: 12px;
    color: var(--text-gray);
}

@media (max-width: 992px) {
    .details-content .row {
        flex-direction: column;
        gap: 40px;
    }
}