/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo .logo {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active:hover {
    color: #ffd700;
}

.nav-link.active {
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.profile-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Mobile-specific hero background optimization */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    
    .hero-bg-image {
        object-fit: cover;
        object-position: center center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 40vh;
    }
    
    .hero-bg-image {
        object-fit: cover;
        object-position: center center;
        width: 100%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.4) 50%,
        rgba(0,0,0,0.8) 100%
    );
    z-index: -1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #fff;
    color: #000;
}

.btn-primary:hover {
    background-color: #e5e5e5;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Hero Content Section */
.hero-content-section {
    background-color: #000;
    padding: 3rem 0;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.hero-info {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #fff;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: #e5e5e5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
    background-color: #000;
}

.content-section {
    margin-bottom: 4rem;
    padding: 0 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.movie-poster {
    width: 100%;
    height: 225px;
    position: relative;
    overflow: hidden;
}

.movie-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster-img {
    transform: scale(1.05);
}

.placeholder-poster {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.movie-caption {
    padding: 0.75rem 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e5e5e5;
    text-align: center;
    line-height: 1.3;
}

/* Footer */
.footer {
    background-color: #111;
    padding: 2rem 4rem;
    text-align: center;
    border-top: 1px solid #333;
}

.footer-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-container,
    .hero-content,
    .content-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-content {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-content-section {
        padding: 2rem 0;
    }
    
    .content-section {
        padding: 0 1.5rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .movie-poster {
        height: 180px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-content-section {
        padding: 1.5rem 0;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .movie-poster {
        height: 150px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-info {
    animation: fadeInUp 0.8s ease-out;
}

.movie-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover Effects */
.movie-card:hover .placeholder-poster {
    border-color: #e50914;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
}

/* Focus States for Accessibility */
.btn:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

.nav-link:focus,
.profile-btn:focus {
    outline: none;
}

/* TV Show Overlay Styles */
.show-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.show-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.overlay-content {
    position: relative;
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 1000px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.show-overlay.active .overlay-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.overlay-poster {
    flex: 0 0 350px;
    position: relative;
}

.overlay-poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
}

.overlay-details {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.overlay-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.2;
}

.overlay-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.overlay-year,
.overlay-rating,
.overlay-duration {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

.overlay-rating {
    background: #e50914;
}

.overlay-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e5e5e5;
    margin-bottom: 1.5rem;
}

.overlay-genres {
    margin-bottom: 2rem;
}

.overlay-genres-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fff;
    display: inline-block;
}

.overlay-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.overlay-play-btn,
.overlay-add-btn {
    flex: 1;
    min-width: 150px;
}

/* Suggested Shows */
.suggested-shows {
    margin-top: 2rem;
    border-top: 1px solid #333;
    padding-top: 2rem;
}

.suggested-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.suggested-card {
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.suggested-card:hover {
    transform: scale(1.05);
}

.suggested-poster {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 8px;
}

.suggested-caption {
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #e5e5e5;
    text-align: center;
    line-height: 1.3;
}

/* Responsive Overlay */
@media (max-width: 768px) {
    .overlay-content {
        flex-direction: column;
        width: 95%;
        max-height: 90vh;
    }
    
    .overlay-poster {
        flex: 0 0 250px;
    }
    
    .overlay-poster-image {
        border-radius: 12px 12px 0 0;
    }
    
    .overlay-details {
        padding: 1.5rem;
    }
    
    .overlay-title {
        font-size: 2rem;
    }
    
    .overlay-actions {
        flex-direction: column;
    }
    
    .overlay-play-btn,
    .overlay-add-btn {
        flex: none;
        width: 100%;
    }
    
    .suggested-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .overlay-details {
        padding: 1rem;
    }
    
    .overlay-title {
        font-size: 1.5rem;
    }
    
    .overlay-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .suggested-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}