body {
    background-color: #141414;
    color: #ffffff;
}
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
}
.hero-section {
    position: relative;
    height: 80vh;
   /* background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url('https://wallpapercave.com/wp/wp8389415.jpg');*/
    background-size: cover;
    background-position: center;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section .display-4 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
.hero-section .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-section .rating-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    margin-left: 1rem;
}
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}
.movie-card {
    background: transparent;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    position: relative;
}
.movie-card:hover {
    transform: scale(1.05);
}
.movie-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}
.movie-card .card-body {
    padding: 0.75rem;
    background: #1a1a1a;
    position: relative;
    width: 100%;
    height: 190px;
    color: white;
}
.movie-card .card-body a {
    color: #e50914;
    text-decoration: none;
}

.movie-card .card-body a:hover {
    color: #b2070f;
}


.scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}
.scroll-content {
    display: flex;
    transition: transform 0.3s ease-in-out;
}
.scroll-item {
    flex: 0 0 200px;
    margin-right: 1rem;
    width: 200px;
}
.movie-info {
    display: block;
    margin-top: 0.5rem;
}
.movie-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}
.movie-rating i {
    color: #ffffff80;
    font-size: 0.8rem;
}
.movie-rating span {
    color: #ffffff80;
    font-size: 0.8rem;
}
.episode-count {
    color: #ffffff80;
    font-size: 0.75rem;
}
.price {
    color: white;
    font-size: 0.8rem;
}
.text-muted {
    color: #ffffff80 !important;
    font-size: 0.75rem;
}
.coming-soon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .scroll-item {
        width: calc(25% - 0.75rem); /* 4 items per row */
    }
}
@media (max-width: 992px) {
    .scroll-item {
        width: calc(33.333% - 0.67rem); /* 3 items per row */
    }
}
@media (max-width: 768px) {
    .scroll-item {
        width: calc(50% - 0.5rem); /* 2 items per row */
    }
    .movie-card img {
        height: 300px;
    }
}
@media (max-width: 576px) {
    .scroll-item {
        width: calc(100% - 1rem); /* 1 item per row */
    }
}

/* Navigation Controls */
.navigation-arrows {
    display: flex;
    gap: 0.5rem;
}

.nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-arrow:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-arrow i {
    font-size: 14px;
}

.footer {
    background-color: #141414;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer h5 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer h6 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer .form-control {
    background-color: #1a1a1a;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.footer .form-control:focus {
    box-shadow: none;
    background-color: #1a1a1a;
}

.social-icons a {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-icons a:hover {
    opacity: 1;
}

/* Movies Grid Page Styles */
.page-title {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-title h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    color: #999;
}

.breadcrumb a {
    color: #fff;
    text-decoration: none;
}

/* Movies Grid Styles */
.movies-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.movie-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    height: 400px;
}

.movie-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .overlay {
    opacity: 1;
}

.overlay button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.3s;
}

.overlay button:hover {
    color: #ff0000;
}

.movie-info {
    padding: 1rem;
}

.movie-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.9rem;
}

.genre {
    color: #ff0000;
}

/* Pagination Styles */
.pagination {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #444;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background-color: #ff0000;
    border-color: #ff0000;
}

/* Responsive Styles for Movies Grid */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .page-title h1 {
        font-size: 1.5rem;
    }

    .movies-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Movie Detail Page Styles */
.movie-detail-hero {
    background-color: #141414;
    padding: 120px 0 60px;
    position: relative;
}

.movie-poster {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    border-radius: 8px;
}

.rating-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
}

.rating-badge .rating {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.rating-details {
    font-size: 12px;
    color: #999;
}

.rating-details span {
    display: block;
}

.movie-info-header h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
}

.original-title {
    color: #999;
    font-size: 18px;
    margin-bottom: 10px;
}

.series-info {
    color: #999;
    font-size: 16px;
}

.series-info .dot {
    margin: 0 10px;
}

.action-buttons .btn {
    padding: 10px 24px;
    border-radius: 25px;
}

.btn-primary.watch-trailer {
    background-color: #e50914;
    border-color: #e50914;
}

.btn-primary.watch-trailer:hover {
    background-color: #b2070f;
    border-color: #b2070f;
}

.movie-description {
    color: #999;
    font-size: 16px;
    line-height: 1.6;
}

.movie-details {
    margin-top: 30px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h6 {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.genres-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.genre-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* Cast & Crew Section */
.cast-crew-section {
    padding: 60px 0;
    background-color: #141414;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: bold;
}

.view-all {
    color: #e50914;
    text-decoration: none;
    font-size: 16px;
}

.view-all:hover {
    color: #b2070f;
}

.cast-card {
    margin-bottom: 30px;
}

.cast-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cast-info h5 {
    font-size: 16px;
    margin-bottom: 5px;
}

.cast-info p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Responsive Styles for Movie Detail */
@media (max-width: 768px) {
    .movie-detail-hero {
        padding: 100px 0 40px;
    }

    .movie-info-header h1 {
        font-size: 32px;
    }

    .movie-poster {
        margin-bottom: 30px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .action-buttons .btn {
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .movie-info-header h1 {
        font-size: 28px;
    }

    .series-info {
        font-size: 14px;
    }

    .movie-description {
        font-size: 14px;
    }

    .cast-card {
        margin-bottom: 20px;
    }
} 


/*category.php*/
.category-grid {
    padding: 2rem 0;
}
.category-item {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.category-item:hover {
    transform: translateY(-5px);
}
.category-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #dc3545;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.category-item:hover::after {
    transform: scaleX(1);
}
.category-title {
    color: #dc3545;
    font-size: 1.1rem;
    margin: 0;
}
.page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
}
.hero-banner {
    height: 300px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('https://wallpapercave.com/wp/wp8389415.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    margin-top: 56px; /* ให้พื้นที่สำหรับ fixed navbar */
}
.banner-content {
    text-align: center;
    color: white;
}
.banner-content h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.banner-content p {
    font-size: 1.2rem;
    opacity: 0.8;
}
/* ปรับ margin ของ container แรกให้เข้ากับ hero banner */
.container.mt-5.pt-4 {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}
/*category.php*/

/* Movie Title Link Styles */
.movie-card h5 a {
    color: #ff0000;  /* สีแดง */
    text-decoration: none;  /* ไม่มีขีดเส้นใต้ */
    text-align: center;  /* จัดกึ่งกลาง */
    display: block;  /* ทำให้ข้อความอยู่กึ่งกลางได้ */
    font-weight: 500;  /* ความหนาของตัวอักษร */
    transition: color 0.3s ease;  /* เอฟเฟกต์เมื่อ hover */
}

.movie-card h5 a:hover {
    color: #cc0000;  /* สีแดงเข้มเมื่อ hover */
}

.movie-card h5 {
    margin: 10px 0;
    text-align: center;  /* จัดกึ่งกลางสำหรับ h5 ด้วย */
}

/* ปรับ responsive */
@media (max-width: 1200px) {
    .movie-image {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .movie-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .movie-image {
        height: 280px;
    }
}

@media (max-width: 576px) {
    .movie-image {
        height: 400px;  /* ให้กลับไปสูงเท่าเดิมในหน้าจอมือถือ เพราะจะแสดง 1 คอลัมน์ */
    }
}
