/* --- Global --- */
html, body {
    margin: 0;
    padding: 0;
    background-color: #1C1C1C;
    font-family: "Nunito", sans-serif;
    height: 100%;
    display: flex;
    flex-direction: column; /* header, main, footer stacked */
}

main {
    flex: 1; /* takes available space between header and footer */
    display: flex;
    flex-direction: row; /* default: image left, text right */
    padding: 0 5vw;
    box-sizing: border-box;
    overflow: hidden; /* hide scrollbars on desktop */
}

/* --- Split screen layout --- */
.split-screen {
    display: flex;
    width: 100%;
    flex: 1;
}

/* --- Media container (video or image) --- */
.media-container {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

#user-media {
    width: 100%;
    height: 100%;
    object-fit: cover; /* scale image to fit, no cropping */
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
    background-color: #000;
}

/* Caption overlay */
.media-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    color: #fff;
    background-color: rgba(0,0,0,0.5);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.9rem;
    pointer-events: none;
    white-space: nowrap;
}

/* --- Right side content --- */
.right-side {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    color: #fff;
    padding: 2rem;
    box-sizing: border-box;
    overflow: auto; /* allow text scrolling if needed */
}

.right-side h2 {
    font-size: 2.5rem;
    margin: 0;
    color: #F24949;
}

.right-side span {
    font-size: 1rem;
    color: #afafaf;
    margin-bottom: 1rem;
    display: block;
}

/* Enter button */
#enter {
    margin-top: 2rem;
    background-color: #F24949;
    border: none;
    border-radius: 15px;
    width: 7rem;
    height: 2.5rem;
    color: white;
    align-self: center;
}

#enter:hover {
    background-color: #f37c7c;
}

#enter:active {
    background-color: #2C2C2C;
    color: #F24949;
}

/* --- Beta password overlay --- */
#password-overlay {
    position: fixed;       /* stay on top of everything */
    top: 0;
    left: 0;
    width: 100vw;          /* full viewport width */
    height: 100vh;         /* full viewport height */
    background-color: #1a1a1a; /* semi-dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;         /* above all content */
}

.password-box {
    background-color: #2C2C2C;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 0 20px rgba(242, 73, 73, 0.5);
    color: #fff;
    max-width: 400px;
    width: 90%;
}

.password-box h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #F24949;
}

.password-box input {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    width: 100%;
    margin: 0.5rem 0;
    box-sizing: border-box;
}

.password-box button {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: none;
    background-color: #F24949;
    color: white;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
}

#password-message {
    color: #f37c7c;
    margin-top: 0.5rem;
    min-height: 1.2rem; /* prevent layout shift */
}

/* --- Mobile layout --- */
@media (max-width: 768px) {
    main {
        padding: 0 2vw;
    }

    .split-screen {
        flex-direction: column;
        height: auto;
    }

    .media-container {
        width: 100%;
        height: auto;
    }

    #user-media {
        width: 100%;
        height: auto;
        max-height: 50vh; /* limit image height to 50% of viewport */
        object-fit: contain;
    }

    .media-caption {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
        bottom: 5px;
        left: 5px;
    }

    .right-side {
        width: 100%;
        height: auto; /* allow content to grow */
        padding: 1rem 0;
        overflow: visible;
    }

    .right-side h2 {
        font-size: 1.8rem;
    }

    .right-side span {
        font-size: 0.9rem;
    }
}
