/* Global Vars */
:root {
    --primary-color: #E50914;
    --bg-color: #141414;
    --card-bg: #181818;
    --text-color: #ffffff;
    --text-muted: #808080;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Auth Pages (Landing, Login, Signup) Shared Styles */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://assets.nflxext.com/ffe/siteui/vlv3/f841d4c7-10e1-40af-bca1-0758328f7730/8345b140-5a9e-4a65-9eb9-648dc67f259c/US-en-20220502-popsignuptwoweeks-perspective_alpha_website_small.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.auth-header {
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 150px;
}

.logo img {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #b20710;
}

/* Landing Page Hero */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    max-width: 700px;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.email-form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 700px;
}

.email-form input {
    flex: 1;
    padding: 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 2px 0 0 2px;
}

.btn-get-started {
    background-color: var(--primary-color);
    color: white;
    padding: 0 1.5rem;
    font-size: 1.5rem;
    border-radius: 0 2px 2px 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auth Forms (Login / Signup) */
.form-container {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 4rem;
    width: 100%;
    max-width: 450px;
    margin: 2rem auto;
    border-radius: 4px;
    animation: slideUp 0.5s ease-out;
}

.form-container h1 {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background-color: #333;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    background-color: #454545;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.form-help {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-switch {
    margin-top: 2rem;
    color: var(--text-muted);
}

.form-switch a {
    color: white;
}

.error-message {
    color: #e87c03;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* Home Page Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.5s;
}

.navbar.scrolled {
    background-color: var(--bg-color);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    border: 1px solid white;
    padding: 5px 10px;
    border-radius: 4px;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 5px;
    outline: none;
    width: 0;
    transition: width 0.3s;
}

.search-box:hover input, .search-box input:focus {
    width: 200px;
}

.profile-icon {
    width: 32px;
    height: 32px;
    background-color: #e50914;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Main Banner */
.banner {
    height: 80vh;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    padding-left: 4rem;
    position: relative;
}

.banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10rem;
    background: linear-gradient(transparent, var(--bg-color));
}

.banner-content {
    max-width: 600px;
    z-index: 10;
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.banner-plot {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-buttons button {
    padding: 0.8rem 2rem;
    margin-right: 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-play {
    background-color: white;
    color: black;
}

.btn-play:hover {
    background-color: rgba(255,255,255,0.7);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

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

/* Row Styles */
.row {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.row h2 {
    margin-left: 1rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.row-posters {
    display: flex;
    overflow-y: hidden;
    overflow-x: scroll;
    padding: 1rem;
}

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

.row-poster {
    max-height: 250px;
    object-fit: contain;
    width: 100%;
    margin-right: 15px;
    transition: transform 450ms;
    cursor: pointer;
}

.row-poster:hover {
    transform: scale(1.08);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.3s;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 2100;
}

.modal-banner {
    height: 400px;
    background-size: cover;
    background-position: top;
}

.modal-details {
    padding: 2rem;
}

.modal-info {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    color: #46d369; /* Netflix positive color */
    font-weight: 600;
}

.modal-rating {
    border: 1px solid gray;
    padding: 0 5px;
    color: white;
}

.modal-plot {
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Spinner */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media(max-width: 768px) {
    .auth-header {
        padding: 1.5rem 2rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .email-form {
        flex-direction: column;
        gap: 1rem;
    }
    .email-form input, .btn-get-started {
        border-radius: 4px;
        width: 100%;
    }
    .navbar {
        padding: 1rem 2rem;
    }
    .nav-left { gap: 1rem; }
    .banner-title { font-size: 2rem; }
}
