@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #c90000;
    --primary-color-hover: #750202;
    --primary-color-rgb: 84, 0, 0;
    --secondary-color: #700;
    --secondary-color-rgb: 112, 0, 0;
    --gradient-gold: linear-gradient(#540000, #c90000, #540000);
    --gradient-black: linear-gradient(#000000, #000000);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, button, input, select, textarea {
    font-family: 'Kanit', sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 10%, transparent);
    padding: 1rem 4%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--secondary-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1920px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-toggle {
    display: none;
}

/* Search */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.search-container.active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
}

.search-icon {
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.search-icon:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    width: 0;
    margin-left: 0;
    transition: all 0.3s ease;
    opacity: 0;
}

.search-input:not(.hidden) {
    width: 250px;
    margin-left: 8px;
    opacity: 1;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input.hidden {
    width: 0;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 8px;
    display: none;
}

.search-result-item {
    padding: 0.8rem;
    border-bottom: 1px solid #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-result-item:hover {
    background: #333;
}

.search-result-img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-input:not(.hidden) {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .search-input:not(.hidden) {
        width: 150px;
    }
    
    .search-icon {
        font-size: 16px;
        padding: 6px;
    }
}

/* Profile */
.require-login{cursor:pointer;}

.profile-dropdown {
    position: relative;
}

.profile-img {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background: var(--primary-color-hover);;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    min-width: 160px;
    border-radius: 4px;
    display: none;
    z-index: 1001;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background: #333;
}

/* Hero Section */

.hero-card {
    position: relative;
    width: 90%;
    max-width: 360px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.hero-poster {width:100%; display:block;}
.hero-overlay {
    position:absolute; bottom:0; left:0; right:0;
    padding:1.2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.0) 60%);
}
.hero-card-title{font-size:2rem;font-weight:800;margin-bottom:0.3rem;}
.hero-card-sub{font-size:1rem;margin-bottom:0.8rem;}
.hero-rank{font-size:0.9rem;opacity:0.9;margin-bottom:0.8rem;}
.hero-card-buttons{display:flex;gap:0.75rem;}
.hero-play{background:#fff;color:#000;padding:0.6rem 1.4rem;border:none;border-radius:4px;font-weight:600;display:flex;align-items:center;gap:0.4rem;cursor:pointer;}
.hero-mylist{background:rgba(255,255,255,0.15);color:#fff;padding:0.6rem 1.4rem;border:none;border-radius:4px;font-weight:600;display:flex;align-items:center;gap:0.4rem;cursor:pointer;}
.hero-play:hover{background:#e6e6e6;}
.hero-mylist:hover{background:rgba(255,255,255,0.3);}

/* Desktop override: position hero buttons bottom-right of description */
@media (min-width: 1024px) {
  .hero-info{display:flex;flex-direction:column;align-items:flex-start;position:static;}
  
  .hero-info{ position:relative; }
  .hero-buttons{
    position:static;
    align-self:flex-end;
    transform:none;
    margin-top:1rem;
  }
}

.hero {
position: relative;
height: 70vh;
min-height: 500px;
overflow: hidden;
display: flex;
align-items: center;
color: white;
    display: flex;
    align-items: center;
    color: white;
}

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 100%;
}

.hero-info {
    max-width: 500px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.hero-buttons {
    position: absolute;
    bottom: -30%;
    left: 30%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}
.hero-content { position: relative; }

/* Hero play button white style */
.hero-buttons .btn-primary {
    background: rgba(255,255,255,0.9);
    color: #000;
}
.hero-buttons .btn-primary:hover {
    background: #ffffff;
}
.hero-buttons .btn-primary i {
    color: #000;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-buttons .btn-primary {
    background: var(--primary-color);
    color: white;
}

.hero-buttons .btn-primary:hover {
    background: var(--primary-color-hover);
    transform: translateY(-2px);
}

.hero-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Hero Navigation */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav.prev {
    left: 2rem;
}

.hero-nav.next {
    right: 2rem;
}

/* Hero Dots */
.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

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

.hero-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 4%;
    }
    
    .nav-container {
        gap: 1rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.95);
        flex-direction: column;
        padding:1rem 0;
        border-top:1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu.active {
        display:flex;
    }
    
    .nav-menu li {
        margin: 0;
        text-align: center;
    }
    
    .nav-menu a {
        display:block;
        padding:1rem;
        border-bottom:1px solid rgba(255,255,255,0.1);
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .profile-dropdown .profile-img {
        width: 32px;
        height: 32px;
    }

    .hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 2rem 5%;
        justify-content: center;
        text-align: center;
    }
    
    .hero-info {
        max-width: 100%;
        padding: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        justify-content: center;
    }
    
    .btn-primary {
        background: var(--primary-color);
        border: none;
    }
    
    .btn-secondary {
        background: rgba(109, 109, 110, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.6rem 3%;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .mobile-menu-toggle {
        font-size: 1.3rem;
    }
    
    .profile-dropdown .profile-img {
        width: 28px;
        height: 28px;
    }

    .hero {
        height: 60vh;
        min-height: 450px;
    }
    
    .hero-content {
        padding: 1.5rem 4%;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        max-width: 95%;
    }
    
    .hero-buttons {
        gap: 0.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        max-width: 260px;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-primary i,
    .btn-secondary i {
        font-size: 1rem;
        margin-right: 0.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        bottom: 10%;
        left: 50%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .hero-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-nav.prev {
        left: 1rem;
    }
    
    .hero-nav.next {
        right: 1rem;
    }
    
    .hero-dots {
        bottom: 1rem;
    }
    
    .hero-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-nav {
        display: none; /* Hide navigation arrows on very small screens */
    }
}

/* Main Content */
.main-content {
    padding: 2rem 4%;
    max-width: 1920px;
    margin: 0 auto;
}

.content-row {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e5e5e5;
}

/* Movie Carousel */
.movie-carousel {
    position: relative;
}

.carousel-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.movie-card {
    position: relative;
    min-width: 200px;
    height: 300px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #1a1a1a;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.movie-poster {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.series-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.adult-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 69, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-overlay {
    transform: translateY(0);
}

.movie-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.movie-year {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0 0 0.25rem 0;
}

.movie-studio {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0 0 0.5rem 0;
    color: #ff6b35;
    font-weight: 500;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.movie-rating i {
    color: #ffd700;
}

.movie-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.play-btn, .info-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.movie-detail {
    max-width: 800px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #fff;
}

/* Movie Detail Modal Responsive Styles */
.movie-detail-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.movie-detail-poster {
    width: 300px;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.movie-detail-info {
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
}

.movie-detail-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.movie-detail-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #ccc;
    flex-wrap: wrap;
}

.movie-detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.movie-detail-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.similar-movies-section {
    margin-top: 2rem;
}

.similar-movies-title {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.similar-movies-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.similar-movie-card {
    min-width: 150px;
    height: 225px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.similar-movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        justify-content: center;
    }
    
    .movie-card {
        min-width: 150px;
        height: 225px;
    }
    
    .main-content {
        padding: 1rem 2%;
    }
    
    .movie-detail-container {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .movie-detail-poster {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 2/3;
        align-self: center;
    }
    
    .movie-detail-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .movie-detail-meta {
        justify-content: center;
        font-size: 0.9rem;
    }
    
    .movie-detail-description {
        font-size: 1rem;
        text-align: center;
    }
    
    .movie-detail-buttons {
        justify-content: center;
    }
    
    .similar-movies-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .similar-movie-card {
        min-width: 120px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 2%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .movie-card {
        min-width: 120px;
        height: 240px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .movie-detail-title {
        font-size: 1.5rem;
    }
    
    .movie-detail-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .movie-detail-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .movie-detail-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .movie-detail-buttons button {
        width: 100%;
        justify-content: center;
    }
    
    .similar-movie-card {
        min-width: 100px;
        height: 150px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .movie-detail-poster {
        width: 250px;
        height: 375px;
    }
    
    .movie-detail-title {
        font-size: 2.2rem;
    }
    
    .movie-detail-description {
        font-size: 1rem;
    }
}

/* Browse Page Styles */
.browse-container {
    padding: 2rem 4%;
    max-width: 1920px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

.browse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.browse-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.browse-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.browse-movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.browse-movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.browse-movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.browse-movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 2rem 1rem 1rem;
    color: #ffffff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.browse-movie-card:hover .browse-movie-info {
    transform: translateY(0);
}

.browse-movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.browse-movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.browse-movie-genre {
    font-size: 0.8rem;
    color: #999;
}

.browse-movie-studio {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    color: #ff6b35;
    font-weight: 500;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.nav-menu a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Browse Page Responsive */
@media (max-width: 768px) {
    .browse-container {
        padding: 1rem 2%;
    }
    
    .browse-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .browse-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .browse-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .browse-movie-card img {
        height: 225px;
    }
    
    .browse-movie-info {
        padding: 1.5rem 0.8rem 0.8rem;
    }
    
    .browse-movie-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .browse-title {
        font-size: 1.5rem;
    }
    
    .filter-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
    .browse-movie-card img {
        height: 180px;
    }
    
    .browse-movie-title {
        font-size: 0.9rem;
    }
    
    .browse-movie-meta {
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Auth Forms */
.auth-container {
    text-align: center;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #ffffff;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.full-width {
    width: 100%;
}

.forgot-password {
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Browse Header */
.browse-header {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.6) 0%, rgba(var(--secondary-color-rgb), 0.9) 100%), url('../images/browse-header.jpg') center/cover no-repeat;
    padding: 3rem 4%;
    border-radius: 8px;
    margin-bottom: 2rem;
    margin-top: 3rem;
}
.browse-header .browse-title {
    font-size: 2rem;
    font-weight: 700;
}

/* View All link */
.content-row {
    position: relative;
}
.view-all {
    position: absolute;
    top: 0;
    right: 4%;
    font-size: 0.9rem;
    color: #e5e5e5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.view-all i {
    font-size: 0.8rem;
}
.view-all:hover {
    color: #ffffff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.page-btn {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}
.page-btn:hover {
    background: rgba(255,255,255,0.2);
}
.page-btn.active {
    background: var(--primary-color);
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: default;
}

.movie-count {
    color: #ffffff;
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
    text-align: center;
}
.load-more-btn {
    display: block;
    margin: 0 auto 2rem;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s ease;
}
.load-more-btn:hover {
    background: var(--primary-color-hover);;
}

/* Placeholder / Skeleton Loading */
.movie-card.placeholder {
    position: relative;
    overflow: hidden;
}
.movie-card.placeholder img {
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: blur(6px) brightness(0.6) grayscale(0.2);
}
.movie-card.placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Footer */
.footer {
    background: #000000;
    padding: 3rem 4% 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1920px;
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover Effects */
.movie-card {
    transition: all 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Notification Badge */
.notifications {
    position: relative;
    cursor: pointer;
}

.notifications::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    display: none;
}

.notifications.has-notifications::after {
    display: block;
}

/* --- UfoMovie Header Styles (moved from header.php) --- */
.sf-navbar {
    position: fixed;
    color: #fff;
    top: 0;
    width: 100%;
    z-index: 100;
}
.sf-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.sf-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.sf-left {
    display: flex;
    align-items: center;
}
.sf-mobile-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    margin-left: 1rem;
    cursor: pointer;
    display: none;
}
.sf-nav {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin-left: 2rem;
}
.sf-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.sf-nav a:hover,
.sf-nav .sf-adult:hover {
    color: var(--primary-color);
}
.sf-adult {
    color: #ffa500;
    font-weight: 600;
}
.sf-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sf-search-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}
.sf-login-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.sf-login-btn:hover {
    background: var(--primary-color-hover);;
}
.sf-profile {
    position: relative;
}
.sf-profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}
.sf-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--secondary-color);
    border: 1px solid #333;
    border-radius: 4px;
    display: none;
    flex-direction: column;
    min-width: 150px;
}
.sf-dropdown a {
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
}
.sf-dropdown a:hover {
    background: #2a2a2a;
}
.sf-profile:hover .sf-dropdown {
    display: flex;
}
/* Search Overlay */
.sf-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
}
.sf-search-overlay.active {
    display: flex;
}
.sf-search-content {
    width: 90%;
    max-width: 600px;
}
.sf-search-form {
    display: flex;
    gap: 10px;
}
.sf-search-form input,
.sf-search-form select {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
}
.sf-search-form button {
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}
.sf-search-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}
/* Responsive */
@media (max-width: 768px) {
    .sf-mobile-toggle { display: block; }
    .sf-nav {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--secondary-color);
        flex-direction: column;
        gap: 0;
        display: none;
    }
    .sf-nav.active { display: flex; }
    .sf-nav li { border-bottom: 1px solid #333; }
    .sf-nav a { padding: 14px 20px; }
}

/* Auth Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    overflow-y: auto;
}
.modal-content {
    color: #fff;
    margin: 6% auto;
    padding: 2rem 2.5rem;
    max-width: 420px;
    border-radius: 8px;
    position: relative;
}
.close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}
.auth-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form input {
    width: 100%;
    padding: 10px 12px;
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 0.95rem;
}
.auth-form .btn-primary {
    width: 100%;
    background: var(--primary-color);
    border: none;
    color: #fff;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
    margin-top: 0.5rem;
}
.auth-form .btn-primary:hover {
    background: var(--primary-color-hover);
}
