@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&display=swap');

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

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #141414;
    color: #fff;
    overflow-x: hidden;
}

*:focus {
    outline: none;
}

.focused {
    outline: 3px solid white;
    outline-offset: -3px;
    transition: outline 0.1s ease-out;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.header.scrolled {
    background-color: #141414;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 4%;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1100;
}


.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.notifications,
.profile {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-icon:hover,
.notifications:hover {
    transform: scale(1.1);
}

.profile img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile img:hover {
    transform: scale(1.05);
}

.hero {
    height: 90vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-top: 0;
    overflow: hidden;
    /* For slider */
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease-in-out;
    display: flex;
    align-items: flex-end;
}

.hero-slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content {
    padding: 0 4%;
    padding-bottom: 180px;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.625rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0) 0%, rgba(20, 20, 20, 1) 100%);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #fff;
    color: #000;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: #fff;
}

.btn-secondary:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.content-rows {
    padding: 0 4% 50px;
    margin-top: -100px;
    position: relative;
    z-index: 3;
}

.row {
    margin-bottom: 40px;
}

.row-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.row-posters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scrollbar-width: none;
}

.row-posters::-webkit-scrollbar {
    display: none;
}

.poster {
    min-width: 280px;
    height: 157px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.poster:hover {
    transform: scale(1.05);
}

.poster.focused {
    transform: scale(1.05);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #181818;
    border-radius: 8px;
    width: 80vw;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-content-small {
    background-color: #181818;
    border-radius: 8px;
    width: 90vw;
    max-width: 500px;
    padding: 30px 40px;
    position: relative;
    color: #fff;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.profile-modal-content {
    max-width: 450px;
    padding: 50px 60px;
}

.modal-overlay.open .modal-content-small {
    transform: scale(1);
}

.modal-content-small h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.modal-content-small p {
    margin-bottom: 25px;
    color: #d2d2d2;
    line-height: 1.5;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.form-input {
    background: #333;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 16px;
    color: #fff;
    font-size: 16px;
}

.form-input::placeholder {
    color: #8c8c8c;
}

.form-input:focus {
    outline: none;
    border-color: #fff;
}

.form-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 10px;
}

.form-switch {
    color: #737373;
    font-size: 14px;
}

.form-switch a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

.modal-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(90deg, #181818d6 0%, #181818c9 40%, rgb(24 24 24 / 49%) 50%, rgba(24, 24, 24, 0) 60%);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(20, 20, 20, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.modal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.modal-info {
    padding: 4% 5%;
    width: 50%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-title {
    font-size: 2.5vw;
    font-weight: 700;
    margin-bottom: 1.5vh;
}

.modal-description {
    font-size: 1.1vw;
    line-height: 1.6;
    margin-bottom: 2vh;
    color: #d2d2d2;
    overflow-y: auto;
    max-height: 25%;
    padding-right: 10px;
    /* For scrollbar */
}

.modal-description::-webkit-scrollbar {
    width: 8px;
}

.modal-description::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.modal-description::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.modal-description::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.modal-platforms {
    font-size: 1vw;
    font-weight: 600;
    margin-bottom: 1.5vh;
    color: #a0a0a0;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.platform-btn img {
    height: 7vh;
    transition: opacity 0.3s ease;
}

.platform-btn:hover img {
    opacity: 0.8;
}

.platform-btn.focused img {
    outline: 2px solid white;
    border-radius: 4px;
}

/* Form messages */
.form-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
    /* Hidden by default */
}

.form-message.success {
    background-color: #0c4b1d;
    color: #d1e7dd;
    display: block;
}

.form-message.error {
    background-color: #691c1c;
    color: #f8d7da;
    display: block;
}

body.modal-open {
    overflow: hidden;
}

.footer {
    padding: 50px 4%;
    background-color: #101010;
    margin-top: 50px;
    border-top: 1px solid #222;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    color: #757575;
}

.social-links {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.social-links a {
    color: #757575;
    font-size: 24px;
    transition: color 0.3s ease;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: #757575;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copy {
    color: #555;
    font-size: 12px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        order: 3;
    }

    .nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #141414;
        padding: 80px 20px;
        transition: right 0.3s ease;
        z-index: 1050;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 18px;
        padding: 15px 0;
        border-bottom: 1px solid #333;
    }

    .hero-title {
        /* This is now handled by the clamp() function */
    }

    .hero-description {
        font-size: 16px;
    }

    .poster {
        min-width: 200px;
        height: 112px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hero-button-center {
    position: absolute;
    left: 50%;
    top: 70%;
    transform: translate(-50%, -50%);
    z-index: 3;
}