/* IMDB-style Movie Database - Clean Dark Theme */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e5e5e5;
    line-height: 1.6;
}

/* Include homepage sections styles */
@import url('home-sections.css');

/* Header */
.header {
    background-color: #f5c518;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    width: 300px;
    font-size: 14px;
}

.search-btn {
    background-color: #1a1a1a;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* Navigation */
.nav {
    background-color: #1f1f1f;
    padding: 12px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #f5c518;
}

/* Main Content */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: #fff;
    border-left: 4px solid #f5c518;
    padding-left: 15px;
}

/* Hero Section for Homepage */
.hero-section {
    position: relative;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 40px 30px;
}

.hero-title {
    font-size: 42px;
    color: #fff;
    margin-bottom: 10px;
}

.hero-meta {
    display: flex;
    gap: 20px;
    color: #b3b3b3;
    margin-bottom: 15px;
    font-size: 14px;
}

.hero-overview {
    max-width: 700px;
    color: #e5e5e5;
    font-size: 16px;
    line-height: 1.5;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(245,197,24,0.9);
}

/* Movie Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

/* FIXED COMPACT GRID - Homepage 5 columns per row! */
.compact-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 40px;
}

.movie-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.poster-container {
    position: relative;
    padding-top: 150%; /* 2:3 aspect ratio */
}

.poster-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #f5c518;
    color: #000;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.card-info {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 13px;
}

.genre-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.genre-tag {
    background-color: #333;
    color: #ccc;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

/* TV Shows Grid - Same style as movies */
.tv-shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

/* Use same card styles for consistency */

/* Sections */
.section-title {
    font-size: 24px;
    color: #fff;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5c518;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Footer */
.footer {
    background-color: #1f1f1f;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #f5c518;
}

.footer-text {
    color: #666;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .nav-menu {
        justify-content: center;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-section {
        height: 350px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

.error-message {
    background-color: #3a1a1a;
    color: #ff6b6b;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 40px 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Card Detail Link */
.card-detail-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
