:root {
    --netflix-red: #e50914;
    --netflix-dark: #141414;
    --netflix-light: #f5f5f5;
    --netflix-text-primary: #ffffff;
    --netflix-text-secondary: #b3b3b3;
    --netflix-background: #181818;
    --netflix-card-bg: #1a1a1a;
    --netflix-card-hover: #2a2a2a;
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--netflix-background);
    color: var(--netflix-text-primary);
    padding-top: 70px;
}

/* Header Styles */
header {
    background-color: var(--netflix-dark);
    transition: background-color 0.3s ease;
    z-index: 1000;
}

header.scrolled {
    background-color: rgba(20, 20, 20, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--netflix-red) !important;
}

.logo-icon {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-link {
    color: var(--netflix-text-secondary) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--netflix-text-primary) !important;
}

.search-box input {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 15px 8px 35px;
    border-radius: 4px;
    width: 200px;
    transition: width 0.3s ease;
}

.search-box input:focus {
    outline: none;
    width: 250px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom right, #000000, #1a1a1a);
    overflow: hidden;
    padding: 20px 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.featured-content {
    padding: 0 15px;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(229, 9, 20, 0.2);
    color: #ff6b6b;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--netflix-text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.categories span {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.review-excerpt {
    color: var(--netflix-text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.read-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--netflix-red);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.read-review-btn:hover {
    background-color: #f40612;
}

.trending-sidebar {
    margin-bottom: 30px;
    display: none;
}

.trending-reviews {
    background: linear-gradient(to bottom right, rgba(20, 20, 20, 0.8), rgba(20, 20, 20, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.trending-reviews h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.trending-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.trending-poster {
    width: 60px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-item:hover .trending-poster img {
    transform: scale(1.05);
}

.trending-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.trending-item:hover h4 {
    color: var(--netflix-red);
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--netflix-text-secondary);
    margin-bottom: 5px;
}

.trending-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.trending-categories span {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.7rem;
}

/* Movie List Section */
.movie-list-section {
    padding: 60px 0;
    background-color: var(--netflix-background);
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle button {
    background-color: #333;
    border: none;
    color: var(--netflix-text-secondary);
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle button.active {
    background-color: var(--netflix-red);
    color: white;
}

.sort-select {
    background-color: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.filters {
    background-color: var(--netflix-card-bg);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: none;
}

.filters.show {
    display: block;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background-color: #333;
    color: var(--netflix-text-secondary);
    border: none;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag.active {
    background-color: var(--netflix-red);
    color: white;
}

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

.movie-grid.list-view {
    grid-template-columns: 1fr;
}

.movie-card {
    background-color: var(--netflix-card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 15px;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--netflix-red);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 50px;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.movie-category {
    background-color: #333;
    color: var(--netflix-text-secondary);
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 0.7rem;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.movie-tag {
    background-color: #262626;
    color: var(--netflix-text-secondary);
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 0.7rem;
}

/* List View Styles */
.movie-card.list-view {
    display: flex;
    gap: 15px;
}

.movie-card.list-view .movie-poster {
    width: 100px;
    height: 140px;
    flex-shrink: 0;
}

.movie-card.list-view .movie-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-card.list-view .movie-title {
    white-space: normal;
    margin-bottom: 5px;
}

.movie-card.list-view .movie-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.movie-card.list-view .movie-rating {
    margin-bottom: 0;
}

.movie-card.list-view .read-review-btn {
    align-self: flex-start;
    padding: 5px 15px;
    font-size: 0.8rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 0;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results p {
    font-size: 1.2rem;
    color: var(--netflix-text-secondary);
    margin-bottom: 20px;
}

.clear-filters-btn {
    background-color: var(--netflix-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
    background-color: #f40612;
}

/* Footer */
footer {
    background-color: var(--netflix-dark);
    border-top: 1px solid #333;
    padding: 40px 0 20px;
}

footer p {
    color: var(--netflix-text-secondary);
    max-width: 500px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: var(--netflix-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--netflix-red);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: var(--netflix-text-secondary);
    font-size: 0.9rem;
}

.credit {
    display: flex;
    align-items: center;
    gap: 5px;
}

.heart {
    color: var(--netflix-red);
    margin: 0 5px;
}

/* Category Navbar */
.category-navbar {
    background-color: var(--netflix-dark);
    padding: 15px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 70px;
    z-index: 999;
}

.category-nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-nav a {
    color: var(--netflix-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.category-nav a:hover,
.category-nav a.active {
    color: var(--netflix-text-primary);
}

.category-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--netflix-red);
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    .hero-content {
        padding: 100px 0;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .trending-sidebar {
        display: block;
        margin-bottom: 0;
    }
    
    .read-review-btn {
        max-width: none;
        width: auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .review-excerpt {
        font-size: 0.95rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .category-nav ul {
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .category-nav a {
        font-size: 1rem;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }
    
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .movie-meta {
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 5px 15px;
    }
    
    .review-excerpt {
        font-size: 0.9rem;
    }
    
    .read-review-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .movie-card.list-view {
        flex-direction: column;
    }
    
    .movie-card.list-view .movie-poster {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .categories span {
        padding: 3px 10px;
        font-size: 0.7rem;
    }
    
    .featured-badge {
        font-size: 0.8rem;
    }
}


/* ปรับสไตล์ปุ่มเมนูมือถือ */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

/* เมื่อเมนูถูกเปิด */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* สไตล์สำหรับเมนูที่แสดงในมือถือ */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(40, 40, 40, 0.95);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover, 
    .nav-link.active {
        color: white !important;
        background-color: rgba(255, 255, 255, 0.1);
    }
}