@font-face {
    font-family: 'Sukhumvit Set';
    src: url('../fonts/sukhumvit.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Premium Color Palette - 2024 Lux Edition */
    --primary-bg: #050505;
    /* Deepest Black */
    --secondary-bg: #0f0f13;
    /* Rich Black/Blue */
    --surface-card: #14141a;
    /* Card Background */

    /* Gold Accents */
    --gold-primary: #D4AF37;
    /* Classic Gold */
    --gold-light: #F4D03F;
    /* Bright Gold */
    --gold-dark: #AA8C2C;
    /* Shadow Gold */
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);

    /* Text Colors */
    --text-main: #FFFFFF;
    --text-muted: #B0B0B0;
    --text-gold: #D4AF37;

    /* Glassmorphism */
    --glass-heavy: rgba(10, 10, 12, 0.95);
    --glass-medium: rgba(20, 20, 25, 0.75);
    --glass-light: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(212, 175, 55, 0.15);

    /* Shadows */
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    --shadow-depth: 0 10px 30px rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Sukhumvit Set', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 20%);
    background-attachment: fixed;
    overflow-x: hidden;
}

main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.seo-h1 {
    color: var(--text-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.1rem;
    text-align: center;
    margin: 40px 0;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
    font-weight: 600;
}

/* Premium Navigation */
.nav-top {
    width: 100%;
    height: 85px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background: var(--glass-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-depth);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-top:hover {
    background: rgba(26, 26, 40, 0.85);
}

.nav-top_logo {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.nav-top_logo img {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.4));
    max-width: 72px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nav-top_logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 16px rgba(212, 175, 55, 0.6));
}

.nav-top_mid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.nav-top_mid ul {
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-top_mid ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-top_mid ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold-gradient);
    opacity: 0.1;
    transition: left 0.3s ease;
}

.nav-top_mid ul li a:hover::before {
    left: 0;
}

.nav-top_mid ul li a:hover {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.nav-top_search {
    height: 100%;
    display: flex;
    align-items: center;
}

.offcanvas-menu-button {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--gold-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.offcanvas-menu-button:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.offcanvas-menu-button svg {
    width: 24px;
    height: 24px;
}

/* Premium Offcanvas Menu */
.offcanvas {
    background: var(--secondary-bg) !important;
    border-right: 1px solid var(--glass-border);
}

.offcanvas-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 20px;
    background: var(--primary-bg);
}

.offcanvas-title {
    color: var(--gold-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn-close {
    filter: invert(1) brightness(2);
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

.offcanvas-menu {
    list-style: none;
    padding: 20px 0;
}

.offcanvas-menu li {
    margin: 5px 0;
}

.offcanvas-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.offcanvas-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--gold-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.offcanvas-menu li a:hover {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    padding-left: 30px;
}

.offcanvas-menu li a:hover::before {
    transform: scaleY(1);
}

/* Premium Footer */
footer {
    width: 100%;
    min-height: 200px;
    background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    margin-top: 120px;
    padding: 60px 20px 40px;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold-gradient);
    opacity: 0.3;
}

.footer-logo-container {
    width: 150px;
    height: 150px;
    position: relative;
    margin: 0 auto;
    margin-bottom: 20px;
}

.footer-logo-container2 {
    width: 150px;
    height: 150px;
    position: relative;
    z-index: 9;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
}

.footer-logo-container2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.footer-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 40px 20px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.8;
}

.footer-article h2 {
    font-size: 1.5rem;
    color: var(--text-gold);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.footer-article p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-article a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-article a:hover {
    color: var(--accent-emerald);
    text-decoration: underline;
}

.footer-banner {
    margin-top: 30px;
}

.footer-banner img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.footer-banner img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-premium);
}

/* Scrollbar Styling */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

*::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
    border: 2px solid var(--primary-bg);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Premium Pagination */
.pagination .page-link {
    background-color: var(--glass-medium);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 12px 20px;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pagination .page-item.active .page-link {
    background: var(--gold-gradient);
    border-color: var(--gold-primary);
    color: var(--primary-bg);
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.pagination .page-link:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
    transform: translateY(-2px);
}

/* TV Category Styling */
.tv-category-title {
    width: 100%;
    min-height: 90px;
    padding: 16px 24px;
    background: var(--glass-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-main) !important;
    margin-bottom: 30px;
    box-shadow: var(--shadow-depth);
    transition: all 0.3s ease;
}

.tv-category-title:hover {
    box-shadow: var(--shadow-glow);
    border-color: var(--gold-primary);
}

.tv-category-title-text,
.tv-category-title h2,
.tv-category-title h4,
.tv-category-title div {
    margin-left: 8px;
    margin-right: 12px;
    color: var(--text-gold) !important;
    margin-bottom: 0;
}

/* Sort by: อยู่ขวา แยกจากชื่อหมวด ใช้งานง่าย */
.tv-category-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.tv-category-sort-label {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main) !important;
    white-space: nowrap;
}

.tv-category-sort-select {
    width: auto;
    min-width: 140px;
    max-width: 180px;
    height: 40px;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--primary-bg);
    color: var(--text-main);
    cursor: pointer;
}

.tv-category-channel-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.tv-category-channel {
    display: inline-block;
    width: 120px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tv-category-channel:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-glow);
}

/* Responsive Design */
@media only screen and (max-width: 960px) {
    main {
        width: 100%;
        padding: 0 15px;
    }

    .nav-top {
        padding: 12px 20px;
        height: 75px;
    }

    .nav-top_mid {
        display: none;
    }

    .nav-top_logo img {
        width: 100px;
        height: 56px;
        object-fit: contain;
    }
}

/* Search Dialog Enhancements */
.top-nav_search-dialog {
    position: relative;
}

.top-nav_search-dialog-pane {
    background: var(--glass-heavy) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-depth);
}

.top-nav_search_text {
    background: transparent;
    color: var(--text-main);
    border: none;
    padding: 8px 12px;
}

.top-nav_search_text::placeholder {
    color: var(--text-muted);
}

/* Movie Carousel Premium Styling */
.movie-carousel {
    width: 100%;
    height: 75vh;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-premium);
    margin-bottom: 60px;
}

.movie-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            rgba(10, 10, 15, 0.4) 0%,
            rgba(10, 10, 15, 0.7) 50%,
            rgba(10, 10, 15, 0.95) 100%);
    z-index: 1;
}

.movie-carousel_desc {
    position: relative;
    z-index: 2;
    width: 50%;
    color: var(--text-primary);
    padding: 40px;
}

.movie-carousel-play-btn {
    background: var(--gold-gradient) !important;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--primary-bg);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.movie-carousel-play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

.tag-badge {
    background: var(--glass-light) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 14px;
    margin: 4px;
}

@media only screen and (max-width: 900px) {
    .movie-carousel {
        height: 50vh;
        border-radius: 12px;
    }

    .movie-carousel_desc {
        width: 100%;
        padding: 20px;
    }
}

/* Additional Premium Elements */
.wide-screen-only {
    display: block;
}

@media only screen and (max-width: 935px) {
    .wide-screen-only {
        display: none !important;
    }

    .narrow-screen-only {
        display: block !important;
    }
}

.tv-seo-article {
    width: 100%;
    margin-bottom: 30px;
    color: var(--text-secondary) !important;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
}

.tv-seo-article p {
    color: var(--text-secondary) !important;
    margin-bottom: 0;
}

.tv-seo-article a {
    color: var(--accent-gold);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.tv-seo-article a:hover {
    color: var(--accent-emerald);
}

/* Premium Modal & Dialog Styling */
.modal-content {
    background: var(--secondary-bg) !important;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-depth);
    backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 25px 30px;
}

.modal-title {
    color: var(--gold-primary);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 1px;
}

.modal-body {
    padding: 30px;
    color: var(--text-muted);
}

.modal-footer {
    border-top: 1px solid var(--glass-border);
    padding: 20px 30px;
}

.modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-primary {
    background: var(--gold-gradient);
    border: none;
    color: var(--primary-bg);
    box-shadow: var(--shadow-glow);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.modal-footer .btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.modal-footer .btn-secondary:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Premium Form Controls */
.form-control {
    background: var(--glass-light) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(20, 20, 30, 0.9) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
    color: var(--text-main) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Premium Button Enhancements */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--primary-bg);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    background: var(--gold-gradient);
    color: var(--primary-bg);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Badge Premium Styling */
.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
}

.text-bg-dark {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary) !important;
}

.text-bg-light {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary) !important;
}

/* Premium Link Styling */
a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-emerald);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg,
            var(--tertiary-dark) 0%,
            rgba(212, 175, 55, 0.1) 50%,
            var(--tertiary-dark) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}