* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Netflix Sans', Arial, sans-serif;
    background-color: #141414;
    color: #fff;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent);
    z-index: 1000;
    padding: 20px 40px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #e50914;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    font-size: 14px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    color: #fff;
}

.btn-login, .btn-signup, .btn-logout {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 3px;
}

.btn-signup {
    background-color: #e50914;
}

.btn-login:hover, .btn-logout:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent), 
                url('https://via.placeholder.com/1920x1080') center/cover;
    display: flex;
    align-items: center;
    padding: 0 40px;
    margin-top: 60px;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 30px;
}

.btn-cta {
    display: inline-block;
    background-color: #e50914;
    color: #fff;
    padding: 12px 30px;
    font-size: 18px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.btn-cta:hover {
    background-color: #f40612;
}

/* Movie Sections */
.container {
    padding: 40px;
}

.movie-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card {
    position: relative;
    transition: transform 0.3s;
    cursor: pointer;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 2;
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    border-radius: 0 0 4px 4px;
}

.movie-info h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.movie-info .year {
    font-size: 12px;
    color: #999;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), 
                url('https://via.placeholder.com/1920x1080') center/cover;
}

.auth-box {
    background: rgba(0,0,0,0.75);
    padding: 60px 68px 40px;
    border-radius: 4px;
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form input {
    width: 100%;
    padding: 16px 20px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
}

.auth-form input::placeholder {
    color: #8c8c8c;
}

.btn-auth {
    width: 100%;
    padding: 16px;
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 24px;
}

.btn-auth:hover {
    background: #f40612;
}

.auth-link {
    margin-top: 16px;
    text-align: center;
    color: #8c8c8c;
}

.auth-link a {
    color: #fff;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(229, 9, 20, 0.3);
    border: 1px solid #e50914;
}

.alert-success {
    background: rgba(0, 128, 0, 0.3);
    border: 1px solid #00ff00;
}

/* Browse Page */
.browse-container {
    margin-top: 80px;
    padding: 40px;
}

.browse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.filter-form select {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filter-form select option {
    background: #333;
}

/* Watch Page */
.watch-container {
    margin-top: 60px;
    padding: 20px;
}

.video-player {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.video-player video {
    width: 100%;
    background: #000;
}

.movie-details {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.movie-header {
    margin-bottom: 20px;
}

.movie-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.movie-stats {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

.movie-description {
    margin-bottom: 20px;
}

.movie-description h3 {
    margin-bottom: 10px;
    color: #999;
}

.movie-description p {
    line-height: 1.6;
}

.watch-actions {
    margin-top: 30px;
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background: #444;
}

/* Footer */
.footer {
    background: #000;
    padding: 40px;
    text-align: center;
    color: #999;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content h2 {
        font-size: 18px;
    }
    
    .container {
        padding: 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .auth-box {
        padding: 40px 20px;
    }
    
    .browse-container {
        padding: 20px;
    }
}

/* Movie Card Styles - Enhanced */
.movie-card {
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 2;
}

.movie-poster {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

/* Overlay - 50% Black Background from Bottom */
.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.85) 30%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0) 100%);
    padding: 20px 15px 15px 15px;
    opacity: 1;
    transition: all 0.3s ease;
}

.movie-info-overlay {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.movie-title-overlay {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta-overlay {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.movie-meta-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.movie-year {
    color: #e50914;
    font-weight: 500;
}

.movie-duration {
    color: #ffd700;
}

.movie-rating {
    color: #ffd700;
}

.play-button {
    display: inline-block;
    background: #e50914;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    width: fit-content;
}

.movie-card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

.movie-card:hover .movie-info-overlay {
    transform: translateY(-5px);
}

/* For mobile devices, always show play button */
@media (max-width: 768px) {
    .play-button {
        opacity: 1;
        transform: translateY(0);
    }
    
    .movie-title-overlay {
        font-size: 0.9rem;
    }
    
    .movie-meta-overlay {
        font-size: 0.7rem;
        gap: 8px;
    }
    
    .movie-poster img {
        height: 250px;
    }
}

/* Alternative style if you want a solid black background at bottom */
.movie-overlay-solid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 12px;
    transition: all 0.3s ease;
}

.movie-overlay-solid .movie-title-overlay {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.movie-overlay-solid .movie-meta-overlay {
    font-size: 0.7rem;
    gap: 8px;
}