html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

header {
    background: url('Images/Header1.png') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.header-content {
    position: absolute;
    left: 3vw;
    bottom: 5vh;
    z-index: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-title-box {
    background: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.2rem;
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.header-title-box h1 {
    font-size: 3.5rem;
    margin: 0 auto;
    color: transparent;
    background: url('Images/Header1.png') center center/cover;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font-family: 'Barlow Condensed', 'Barlow', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
}

.header-content p {
    font-size: 1.5rem;
}

.header-content .tagline {
    min-width: 100%;
    display: inline-block;
    text-align: left;
}

section {
    padding: 2rem 0.5rem;
    text-align: center;
    background: #f4f4f4;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: auto;
    aspect-ratio: 16/9;
    margin: 0 auto;
}

.video-container video {
    width: 100%;
    max-width: 1200px;
    height: auto;
    aspect-ratio: 16/9;
    max-height: 675px;
    min-height: 200px;
    border-radius: 8px;
    background: #000;
    display: block;
    margin: 0 auto;
}

.cast-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.cast-member {
    text-align: center;
    width: 150px;
}

.cast-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 1rem;
}

.gallery-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.5s ease;
}

.gallery-image {
    width: calc((100% - 2rem) / 3); /* 3 images per row, 2 gaps of 1rem */
    height: 350px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
}

.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}

.watch-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.watch-link {
    background: #333;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
}

.watch-link:hover {
    background: #555;
}

footer {
    background: #333;
    color: white;
    padding: 2rem;
    text-align: center;
}

.social-links a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.5rem;
}

.social-links a:hover {
    color: #ccc;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lightbox-img {
    max-width: 100vw;
    max-height: 100vh;
    display: block;
    margin: 0 auto;
    padding: 0;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .gallery-image {
        width: calc((100% - 1rem) / 2); /* 2 images per row */
        height: 250px;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }

    .header-content p {
        font-size: 1rem;
    }

    section {
        padding: 2rem 1rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hamburger-menu {
        display: flex;
    }

    nav ul {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 2rem;
    }

    nav ul.active {
        left: 0;
    }

    nav a {
        font-size: 1.2rem;
        padding: 1rem 0;
        display: block;
    }

    .cast-grid {
        justify-content: center;
    }

    .watch-options {
        flex-direction: column;
    }

    .gallery-arrow {
        font-size: 1.5rem;
        padding: 0.3rem 0.8rem;
    }

    .gallery-image {
        width: 100%; /* 1 image per row */
        height: 180px;
    }

    .gallery-wrapper {
        padding: 0 0.5rem;
    }

    .video-container {
        padding: 0 0.5rem;
    }

    /* MOBILE LAYOUT - Force single column stacking */
    .trailer-info-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .about-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    
    .themes-visual-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 2 !important;
        gap: 2rem !important;
    }
    
    .minimal-section {
        margin-bottom: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Force all text to stay within bounds */
    .about-col, .themes-visual-col, .about-summary, .themes-list, .cast-list, .minimal-section p, .minimal-section h2 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    #trailer-section-wrapper {
        padding: 0 0.5rem;
    }
    
    /* Mobile back to top button centering fix */
    #back-to-top {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    
    #back-to-top span {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: rotate(-90deg) !important;
        font-size: 2rem !important;
        line-height: 1 !important;
    }
}

@media (max-width: 480px) {
    .gallery-image {
        width: 100%; /* 1 image per row */
        height: 120px;
    }
    
    .header-content {
        left: 0.5vw;
        bottom: 1vh;
    }
    
    .header-knockout {
        width: 180px;
        height: 35px;
    }
    
    .tagline-wrapper {
        width: 180px;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
}

/* iPhone and mobile specific fixes */
@media (max-width: 428px) {
    body {
        overflow-x: hidden;
    }
    
    section {
        padding: 1rem 0.5rem;
    }
    
    .gallery-wrapper {
        padding: 0 0.25rem;
    }
    
    .video-container {
        padding: 0 0.25rem;
    }
    
    /* MOBILE LAYOUT - Force single column stacking */
    .trailer-info-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        padding: 0 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .about-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    
    .themes-visual-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 2 !important;
        gap: 2rem !important;
    }
    
    .minimal-section {
        margin-bottom: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    #trailer-section-wrapper {
        padding: 0 0.25rem;
    }
    
    .header-content {
        left: 0.25vw;
        bottom: 0.5vh;
    }
    
    .themes-list, .cast-list {
        padding-left: 1rem;
    }
    
    .about-summary {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    /* Aggressive text wrapping for very small screens */
    .about-col, .themes-visual-col, .about-summary, .themes-list, .cast-list, .minimal-section p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Force long words to break */
    .about-summary strong, .minimal-section p em {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Force all text to stay within bounds */
    .about-col, .themes-visual-col, .about-summary, .themes-list, .cast-list, .minimal-section p, .minimal-section h2 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* iPhone and very small screen specific fixes */
@media (max-width: 390px) {
    .trailer-info-row {
        padding: 0 0.25rem !important;
        gap: 2rem !important;
    }
    
    .about-col, .themes-visual-col {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .minimal-section {
        margin-bottom: 1.5rem !important;
    }
    
    .about-summary, .themes-list, .cast-list, .minimal-section p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Mobile back to top button centering fix */
    #back-to-top {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    
    #back-to-top span {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: rotate(-90deg) !important;
        font-size: 2rem !important;
        line-height: 1 !important;
    }
}

/* Mobile back to top button centering fix */
@media (max-width: 768px) {
    #back-to-top span {
        margin-left: -2px !important;
    }
}

/* iPhone and small mobile specific fix */
@media (max-width: 428px) {
    #back-to-top span {
        margin-left: -3px !important;
    }
}

@media (max-width: 900px) {
    .video-container video {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    .trailer-header-row {
        width: 100%;
        max-width: 100%;
    }
    .trailer-info-row {
        width: 100%;
        flex-direction: column;
        gap: 2rem;
    }
    .about-col, .themes-visual-col {
        flex: 1 1 100%;
        min-width: 0;
    }
    .header-title-box h1 {
        font-size: 2.2rem;
    }
    .header-content {
        left: 2vw;
        bottom: 3vh;
    }
    .header-knockout {
        width: 350px;
        height: 60px;
    }
    .tagline-wrapper {
        width: 350px;
    }
}

@media (max-width: 600px) {
    .video-container video {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        border-radius: 0;
    }
    .trailer-header-row {
        width: 100%;
        max-width: 100%;
    }
    /* MOBILE LAYOUT - Force single column stacking */
    .trailer-info-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
        padding: 0 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .about-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 1 !important;
    }
    
    .themes-visual-col {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 2 !important;
        gap: 2rem !important;
    }
    
    .minimal-section {
        margin-bottom: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Force all text to stay within bounds */
    .about-col, .themes-visual-col, .about-summary, .themes-list, .cast-list, .minimal-section p, .minimal-section h2 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .header-title-box h1 {
        font-size: 1.3rem;
    }
    .header-content {
        left: 1vw;
        bottom: 2vh;
    }
    .header-knockout {
        width: 200px;
        height: 40px;
    }
    .tagline-wrapper {
        width: 200px;
    }
    
    /* Mobile back to top button centering fix */
    #back-to-top {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }
    
    #back-to-top span {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: rotate(-90deg) !important;
        font-size: 2rem !important;
        line-height: 1 !important;
    }
}

#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 2.2rem;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}
#back-to-top:hover {
    background: #555;
}
#back-to-top span {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transform: rotate(-90deg);
    text-align: center;
    width: 100%;
    height: 100%;
}

#custom-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}

#play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black circle */
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#play-button::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 20px solid white; /* White play triangle */
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px; /* Slightly offset to center the triangle */
}

#play-button:hover {
    opacity: 0.8; /* Slight fade on hover for feedback */
}

#trailer-section-wrapper {
    position: relative;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}
.trailer-header-row {
    width: 100%;
    max-width: 1200px;
    margin: 0 0 1rem 0;
    padding: 0;
    display: block;
}
.trailer-heading {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin: 0 0 0.5rem 0;
}
#trailer-lightbox.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 2001;
}
#trailer-lightbox.show {
    display: flex;
}
#lightbox-trailer-iframe {
    width: 90vw;
    max-width: 900px;
    height: 60vh;
    max-height: 500px;
    background: #000;
    border: none;
    border-radius: 8px;
}
#close-trailer-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}
.trailer-info-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 0 auto;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 0 1rem;
}
#trailer-info {
    padding-top: 0;
    margin-top: 0;
}
.about-col {
    flex: 0 0 60%;
    min-width: 260px;
    text-align: left;
}
.themes-visual-col {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
}
.about-col h2, .about-col p, .about-col .about-meta, .themes-visual-col h2, .themes-visual-col p, .themes-visual-col ul {
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}
.about-col h2, .themes-visual-col h2, .trailer-heading, .minimal-section h2, .about-minimal h2 {
    font-family: 'Barlow Condensed', 'Barlow', Arial, sans-serif;
    font-weight: 700;
}
.about-minimal, .minimal-section {
    padding: 0;
    margin: 0;
}
.about-content {
    margin: 0;
    padding: 0;
}
.themes-list {
    margin: 0;
    padding-left: 0.8rem;
    line-height: 1.2;
    text-align: left;
}
.minimal-section h2 {
    margin: 0 0 0.15rem 0;
    padding: 0;
}
.minimal-section p {
    margin: 0;
    padding: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}
.about-minimal h2 {
    margin: 0 0 0.15rem 0;
    padding: 0;
}
.about-summary {
    margin: 0;
    padding: 0;
    font-size: 0.97rem;
    line-height: 1.25;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}
.cast-list {
    margin: 0;
    padding-left: 0.8rem;
    list-style: disc;
    line-height: 1.2;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.themes-list {
    margin: 0;
    padding-left: 0.8rem;
    line-height: 1.2;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
#director.minimal-section {
    padding: 0;
    margin: 0;
}
.powered-by {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin: 1rem 0 0 0;
}
.powered-by a {
    color: #888;
    text-decoration: underline;
}
.header-knockout {
    display: block;
    margin-bottom: 0.05rem;
    max-width: 90vw;
    height: auto;
}
.tagline-wrapper {
    width: auto;
    max-width: none;
    margin: 0;
    display: block;
    text-align: center;
}
.tagline {
    text-align: center;
    font-size: 1.35rem;
    padding: 0;
    margin: 0;
}