:root {
    --accent-red: #E50914;
    --main-bg: #141414;
    --card-bg: rgba(0, 0, 0, 0.85);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    /* === ADD YOUR BACKGROUND PHOTO HERE === */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), 
                url('https://res.cloudinary.com/dr1rn40sn/image/upload/v1773830359/movie-poster-background-p5qblffj7cvswl5g_ti68ob.jpg'); /* REPLACE 'YOUR-IMAGE-URL-HERE.jpg' WITH YOUR ACTUAL IMAGE PATH */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* === Styling for the Website Name Link === */
.website-name {
    display: block;
    text-align: center;
    color: var(--accent-red);
    font-size: 2.5rem;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 30px;
    font-family: 'Bebas Neue', sans-serif; /* A bold font for movie websites */
}
.website-name:hover {
    color: #ff3333;
}

.auth-container {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.form-toggle {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
}

.form-toggle button {
    flex: 1;
    background: none;
    border: none;
    color: #b3b3b3;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.form-toggle button.active {
    color: white;
    border-bottom: 3px solid var(--accent-red);
}

form {
    display: flex;
    flex-direction: column;
}

input {
    background: #333;
    border: none;
    border-radius: 5px;
    color: white;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 1rem;
}

input:focus {
    background: #454545;
    outline: none;
}

/* === Password Toggle Styling === */
.password-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}
.password-input-wrapper input {
    width: 100%;
    margin-bottom: 0; /* Reset margin on the input itself */
    padding-right: 45px; /* Leave space for the icon */
    box-sizing: border-box; /* Crucial for width calculation */
}
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b3b3b3;
    cursor: pointer;
    font-size: 1rem;
}
.password-toggle:hover {
    color: white;
}

.auth-btn {
    background: var(--accent-red);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.auth-btn:hover {
    background: #b20710;
}

#otp-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #555;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px;
        margin: 20px;
    }
}

/* =========================================
   RESPONSIVE DESIGN (All Devices)
   ========================================= */

/* 1. EXTRA LARGE SCREENS & TVs (1400px and up) */
@media (min-width: 1400px) {
    .auth-container {
        max-width: 500px; /* Makes the box slightly larger for huge screens */
        padding: 70px;
    }
    .website-name {
        font-size: 3rem;
    }
    .form-toggle button {
        font-size: 1.3rem; /* Larger toggle text */
    }
    input, .auth-btn, .password-toggle {
        font-size: 1.2rem;
        padding: 18px; /* Bigger inputs for easier clicking with a TV remote */
    }
}

/* 2. TABLETS & SMALL LAPTOPS (Max width: 992px) */
@media (max-width: 992px) {
    .auth-container {
        max-width: 380px; 
    }
}

/* 3. MOBILE PHONES (Max width: 768px) */
@media (max-width: 768px) {
    .auth-container {
        padding: 35px 25px;
        width: 90%; /* Allows the box to adapt to the phone's width */
        margin: 20px auto; /* Keeps it perfectly centered */
    }
    .website-name {
        font-size: 2rem;
    }
    .form-toggle {
        margin-bottom: 20px;
    }
    .form-toggle button {
        font-size: 1rem;
        padding: 10px;
    }
    input, .auth-btn, .password-toggle {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* 4. EXTRA SMALL PHONES (Max width: 480px) */
/* Overwrites the mobile styles for really narrow screens */
@media (max-width: 480px) {
    .auth-container {
        padding: 25px 15px;
        width: 95%;
        border-radius: 8px; /* Slightly sharper corners on small phones */
    }
    .website-name {
        font-size: 1.8rem;
    }
    .form-toggle button {
        font-size: 0.9rem;
    }
    input, .password-input-wrapper {
        margin-bottom: 12px;
    }
}
/* =========================================
   CUSTOM POPUP STYLING
   ========================================= */
.custom-popup-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Dark semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensures it stays on top of absolutely everything */
    opacity: 0;
    pointer-events: none; /* Disables clicking when hidden */
    transition: opacity 0.3s ease;
}

/* This class is added by JavaScript to make it visible */
.custom-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.custom-popup-box {
    background: #141414;
    border: 2px solid var(--accent-red);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    color: white;
    max-width: 350px;
    width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.custom-popup-overlay.show .custom-popup-box {
    transform: translateY(0); /* Slide down effect */
}

.custom-popup-btn {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 10px 25px;
    margin-top: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: 0.2s;
}

.custom-popup-btn:hover {
    background: #b20710;
}
