:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #808080;
    --accent: #E50914;
    --accent-hover: #ff0f1a;
    --accent-glow: rgba(229, 9, 20, 0.4);
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --font-family: 'Outfit', sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--text-secondary);
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    transition: all 0.4s ease;
}

.header.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.header-container {
    padding: 0 4%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: #e50914; /* Netflix Red */
    letter-spacing: 2px;
    gap: 8px;
    text-transform: uppercase;
}

.logo-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    width: 32px;
    height: 32px;
}

.logo-icon .fa-film {
    font-size: 1.8rem;
}

.logo-icon .fa-play {
    position: absolute;
    font-size: 0.7rem;
    color: #fff;
    transform: translateX(1px);
}

.logo span {
    color: #fff;
}

.main-nav {
    display: flex;
    gap: 24px;
    margin-left: 30px;
    font-size: 0.9rem;
    align-items: center;
}

.main-nav a {
    color: #e5e5e5;
    transition: color 0.3s;
}

.main-nav a.active {
    color: #fff;
    font-weight: 600;
    position: relative;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e50914; /* Red indicator */
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(229, 9, 20, 0.5);
}

.main-nav a:hover {
    color: #b3b3b3;
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown > a i {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.dropdown:hover > a i {
    transform: rotate(180deg);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 101;
    border: 1px solid var(--glass-border);
    border-top: 2px solid var(--accent);
    border-radius: var(--border-radius);
    padding: 15px;
    top: 100%;
    left: -50%;
    margin-top: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #e5e5e5 transparent;
}

.dropdown-content a {
    color: #b3b3b3;
    padding: 6px 10px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 3px;
}

.dropdown-content a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: transparent;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.search-bar.active {
    background: rgba(0,0,0,0.75);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 4px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0;
    width: 0;
    outline: none;
    font-size: 0.9rem;
    transition: width 0.3s ease, padding 0.3s;
    opacity: 0;
}

.search-bar:focus-within input, .search-bar.active input {
    width: 220px;
    padding: 6px 10px 6px 0;
    opacity: 1;
}

.search-bar button {
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    padding: 6px 10px;
    cursor: pointer;
}

.header-notifications {
    font-size: 1.3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.header-notifications:hover {
    color: #b3b3b3;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.header-user i {
    font-size: 0.8rem;
    color: #fff;
    transition: transform 0.3s;
}

.header-user:hover i {
    transform: rotate(180deg);
}


/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 600px;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    transition: background-image 0.5s ease-in-out;
}

.hero-backdrop.animating {
    animation: slowZoom 10s ease-out forwards;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(20,20,20,0.9) 0%, rgba(20,20,20,0.3) 50%, rgba(20,20,20,0) 100%),
                linear-gradient(to top, var(--bg-primary) 0%, rgba(20,20,20,0) 20%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 50%;
    min-width: 300px;
    padding-top: 25vh;
    padding-left: 4%;
    padding-right: 20px;
}

.hero-content.animating {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 0.6rem;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.hero-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-meta span.match {
    color: #46d369;
}

.hero-meta span.rating {
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0 0.4rem;
}

.hero-desc {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-play, .btn-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-play {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-play:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-more {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.btn-more:hover {
    background-color: rgba(109, 109, 110, 0.5);
    transform: scale(1.05);
}

/* --- Hero Controls (Slider, Mute, Age Rating) --- */
.hero-slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2%;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
}

.slider-btn {
    pointer-events: auto;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
}

.hero-section:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.8);
    border-color: #fff;
    transform: scale(1.1);
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dot:hover {
    background: rgba(255,255,255,0.7);
}

.hero-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

.hero-right-controls {
    position: absolute;
    right: 0;
    bottom: 25%;
    display: flex;
    align-items: center;
    z-index: 5;
}

.mute-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: all 0.2s;
}

.mute-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
}

.age-rating {
    background: rgba(51, 51, 51, 0.8);
    border-left: 3px solid #dcdcdc;
    padding: 8px 30px 8px 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- Main Content & Grid --- */
.main-content {
    margin-top: -100px; /* Overlap hero a bit */
    position: relative;
    z-index: 4;
}

.main-content.no-hero {
    margin-top: 100px;
}

.movies-section {
    padding: 0 4% 6rem;
}

.section-title {
    font-size: 1.4vw;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5em;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px; /* Small gap like Netflix */
}

.movie-card {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: transparent;
    min-width: 0; /* Prevent CSS Grid blowout from long text */
    border-radius: var(--border-radius);
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.movie-poster-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.movie-card:hover .movie-poster-container {
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.4), 0 0 0 1px var(--accent);
}

.movie-poster-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 2;
    transition: none;
}

.movie-card:hover .movie-poster-container::after {
    animation: shine 0.75s;
}

@keyframes shine {
    100% { left: 150%; }
}

.movie-poster {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.play-overlay i {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent);
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.movie-card:hover .play-overlay i {
    transform: scale(1);
}

.movie-info {
    padding: 12px 4px 0 4px;
    display: block;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
    transition: color 0.3s ease;
    display: block;
    width: 100%;
}

.movie-card:hover .movie-title {
    color: var(--accent);
}

.movie-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.movie-rating {
    color: #46d369;
    font-weight: bold;
}

.badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--accent);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.episode-badge {
    left: auto;
    right: 5px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.history-badge {
    top: auto;
    bottom: 5px;
    left: 5px;
    background: rgba(255, 152, 0, 0.9); /* Orange color */
    color: #fff;
    border: none;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
    border: none;
    font-weight: 500;
}

.pagination button.active {
    background: var(--accent);
    color: #fff;
    cursor: default;
}

.pagination button:not(:disabled):not(.active):hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination .dots {
    color: var(--text-secondary);
}

/* --- Modal (Chi Tiết Phim) --- */
.movie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.movie-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.movie-modal.active .modal-content {
    animation: modalSpring 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalSpring {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bg-secondary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px solid transparent;
}

.close-modal:hover {
    border-color: #fff;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 2rem;
}

.modal-backdrop {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center top;
    position: relative;
}

.modal-backdrop::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-secondary) 0%, transparent 80%);
}

.modal-info-container {
    padding: 0 3rem;
    position: relative;
    margin-top: -120px;
    z-index: 2;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.meta-rating { color: #46d369; font-weight: 600; }
.meta-item { color: var(--text-muted); }
.meta-quality { border: 1px solid var(--text-muted); padding: 0 4px; border-radius: 3px; font-size: 0.8rem; }

.modal-two-cols {
    display: flex;
    gap: 2rem;
}

.modal-desc-col {
    flex: 2;
}

.modal-desc {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-details-col {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.modal-details-col span {
    color: var(--text-muted);
}

.modal-details-col p {
    margin-bottom: 0.5rem;
}

.play-btn {
    background: white;
    color: black;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.play-btn:hover {
    background: rgba(255,255,255,0.8);
}

/* Global Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-fav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0 1.2rem;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-fav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.modal-fav-btn.active {
    color: #e50914;
    border-color: #e50914;
}

/* --- Video View --- */
.video-view {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
    z-index: 10;
    display: none;
    padding-top: 100px; /* space for header + extra gap */
}

.video-view.active {
    display: block;
}

.iframe-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-bottom {
    background: var(--bg-primary);
    min-height: 50vh;
    padding: 2rem 4% 6rem 4%;
    max-width: 1100px;
    margin: 0 auto;
}

.episodes-container {
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.episodes-container h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.episodes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.episode-btn {
    background: #2a2a2a;
    color: #a0a0a0;
    padding: 10px 5px;
    border-radius: 4px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    width: 100%;
    cursor: pointer;
}

.episode-btn:hover {
    background: #3a3a3a;
    color: #fff;
    border-color: #555;
}

.episode-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    font-weight: 500;
}

.episode-btn.watched {
    color: #777;
    background: #1a1a1a;
    border-color: #2a2a2a;
}

.episode-btn.watched::after {
    content: " \2713";
    color: #4CAF50;
    margin-left: 3px;
}

.episode-btn.active.watched {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

.episode-btn.active.watched::after {
    color: white;
}

/* --- Video Movie Details --- */
.video-movie-details {
    margin-bottom: 3rem;
}

.video-info-wrapper {
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
}

.video-info-content {
    flex: 1;
}

.video-title {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.video-year {
    color: var(--text-secondary);
    font-weight: 400;
}

.video-origin-name {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.video-meta span {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.video-tags p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.video-tags strong {
    color: var(--text-primary);
}

.video-description {
    margin-top: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.video-description h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.related-movies-container {
    margin-top: 3rem;
}

.related-movies-container .movies-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-movies-container h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* Utilities */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton {
    background: #333;
    background-image: linear-gradient(to right, #333 0%, #444 20%, #333 40%, #333 100%);
    background-repeat: no-repeat;
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear forwards;
}
.skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skeleton-poster {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
}
.skeleton-title {
    height: 16px;
    width: 80%;
    border-radius: 4px;
    margin-top: 5px;
}
.skeleton-meta {
    height: 12px;
    width: 50%;
    border-radius: 4px;
}

/* Favorite Button */
.fav-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    top: auto;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}
.fav-btn:hover {
    background: rgba(229, 9, 20, 0.8);
    transform: scale(1.1);
}
.fav-btn.active {
    color: #e50914;
}

/* --- Home Sections (Horizontal Rows) --- */
.home-sections {
    padding: 0 4% 6rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.movie-row-container {
    position: relative;
    width: 100%;
}

.movie-row-title {
    font-size: 1.4vw;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.movie-row-title i {
    font-size: 0.8em;
    color: var(--accent);
}

.movie-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 20px 25px 35px 25px;
    margin: -20px -25px -35px -25px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.movie-row::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.movie-row {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Make cards inside row have fixed width to avoid shrinking */
.movie-row .movie-card {
    flex: 0 0 auto;
    width: calc(100% / 7 - 13px);
    min-width: 160px;
}

@media (max-width: 1200px) {
    .movie-row .movie-card { width: calc(100% / 5 - 12px); }
    .movie-row-title { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .movie-row .movie-card { width: calc(100% / 3 - 10px); min-width: 130px; }
    .movie-row-title { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .movie-row .movie-card { width: calc(100% / 2 - 8px); min-width: 120px; }
    .home-sections { padding: 0 15px 5rem; }
}

/* --- Responsive --- */
.mobile-menu-btn {
    display: none;
    background: transparent;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 98;
    display: none;
}
.menu-overlay.active {
    display: block;
}

@media (max-width: 900px) {
    .main-nav { margin-left: 10px; gap: 10px; }
    .hero-title { font-size: 2.8rem; }
    .hero-content { width: 70%; }
}

@media (max-width: 768px) {
    .header-container { padding: 0 15px; height: 60px; position: relative; }
    
    .mobile-menu-btn { display: block; }
    
    .main-nav { 
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-primary);
        padding: 80px 20px 80px; /* Thêm padding dưới để không bị cấn */
        transition: left 0.3s ease;
        z-index: 99;
        margin-left: 0;
        align-items: flex-start;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
        overflow-y: auto;
    }
    
    .main-nav.active { left: 0; }
    
    .main-nav > a, .main-nav > .dropdown {
        font-size: 1.1rem;
        padding: 12px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .dropdown { width: 100%; }
    
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        padding-left: 20px;
        display: none;
        min-width: 100%;
        margin-top: 10px;
    }
    
    .dropdown.active .dropdown-content { 
        display: grid; 
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .dropdown-content::before { display: none; }
    .dropdown-content a { 
        padding: 8px 10px; 
        font-size: 0.95rem; 
        background: rgba(255,255,255,0.05);
        border-radius: 4px;
        text-align: center;
    }

    /* Hero Section Mobile */
    .hero-section { height: 65vh; min-height: 500px; }
    .hero-content { width: 100%; margin-top: 0; padding-top: 100px; padding-right: 15px; padding-left: 15px; }
    .hero-title { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 0.4rem; }
    .hero-meta { font-size: 0.85rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
    .hero-desc { font-size: 0.9rem; -webkit-line-clamp: 3; margin-bottom: 1rem; text-shadow: 1px 1px 3px #000; }
    .hero-buttons { flex-direction: row; gap: 10px; width: 100%; }
    .btn-play, .btn-more { padding: 0.5rem 1rem; font-size: 0.9rem; flex: 1; justify-content: center; }
    
    /* Grid */
    .section-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 15px; }
    .movies-section { padding: 0 15px 5rem; }
    .movies-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .related-movies-container .movies-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    
    .movie-info { padding: 8px 4px 0; }
    .movie-title { font-size: 0.85rem; }
    .movie-meta { font-size: 0.75rem; gap: 5px; }
    
    /* Search Bar Mobile */
    .search-bar.active { position: static; }
    .search-bar:focus-within input, .search-bar.active input {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(20, 20, 20, 0.98);
        border: none;
        border-bottom: 1px solid var(--border);
        padding: 12px 15px;
        margin: 0;
        border-radius: 0;
        font-size: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    }
    
    /* Fullscreen Modal Mobile */
    .modal-content { 
        max-height: 100vh;
        height: 100vh; 
        margin: 0; 
        border-radius: 0;
        width: 100vw;
    }
    .modal-backdrop { height: 35vh; min-height: 200px; }
    .modal-info-container { padding: 0 15px; margin-top: -40px; }
    .modal-title { font-size: 1.6rem; }
    .modal-two-cols { flex-direction: column; gap: 1rem; }
    .modal-desc { font-size: 0.95rem; margin-bottom: 1rem; }
    .play-btn { width: 100%; justify-content: center; margin-bottom: 1.5rem; }
    
    /* Video View Mobile */
    .video-view { padding-top: 80px; }
    .video-bottom { padding: 1.5rem 15px; }
    .episodes-list { grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); }
    .episode-btn { padding: 6px 4px; font-size: 0.85rem; }
    
    .video-info-wrapper {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    .video-title {
        font-size: 1.5rem;
        text-align: center;
    }
    .video-origin-name, .video-meta {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .related-movies-container .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .logo { font-size: 1.4rem; }
    .logo-icon { width: 28px; height: 28px; }
    .logo-icon .fa-film { font-size: 1.5rem; }
    
    .header-actions { gap: 12px; }
    .header-notifications { display: none; }
    .user-avatar { width: 28px; height: 28px; }
    
    .mobile-menu-btn { display: block; }
    .hero-title { font-size: 1.8rem; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ripple Effect */
.ripple-btn {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
