.search-bar {
    position: relative;
    width: 40%;
}

.search-bar form {
    display: flex;
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 50px; /* Space for the button */
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-color);
    font-size: 16px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(130, 87, 255, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 2;
}

.search-button:hover {
    color: var(--accent-color);
}

.search-button:focus {
    outline: none;
}

.user-actions {
    display: flex;
    gap: 20px;
}

.user-actions a {
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-actions a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
}

.user-actions a i {
    font-size: 16px;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.page-title h2 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-color) 30%, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    letter-spacing: 0.5px;
}

.page-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--accent-secondary));
    border-radius: 10px;
}

.filter-options {
    display: flex;
    gap: 15px;
}

.filter-options select {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 40px;
}

.filter-options select option {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.filter-options select:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
}

.filter-options select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(130, 87, 255, 0.2);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 40px;
}

.category-tag {
    background: var(--glass-bg);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: background 0.3s ease, transform 0.3s ease;
}

.category-tag:hover {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
    color: white;
}

.category-tag:hover::before {
    background: white;
    transform: scale(1.2);
}

.category-tag.active {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(130, 87, 255, 0.3);
    color: white;
}

.category-tag.active::before {
    background: white;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.movie-card {
    background: var(--glass-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(130deg, rgba(130, 87, 255, 0.15) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 16px;
}

.movie-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(130, 87, 255, 0.3);
}

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

.movie-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.movie-thumbnail img, .movie-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.movie-thumbnail video {
    opacity: 0;
    z-index: 1;
}

.movie-card:hover .movie-thumbnail img {
    opacity: 0;
}

.movie-card:hover .movie-thumbnail video {
    opacity: 1;
}

.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    animation: spin 1s infinite linear;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.movie-card.loading-preview .preview-loading {
    opacity: 1;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.movie-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 4;
}

.movie-duration::before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 10px;
}

.premium-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(130, 87, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.premium-badge::before {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
}

.movie-info {
    padding: 20px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    line-height: 1.5;
    transition: color 0.3s;
    letter-spacing: 0.2px;
}

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

.movie-metadata {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-code {
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    padding-left: 15px;
}

.movie-code::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.movie-card:hover .movie-code {
    text-shadow: 0 0 8px rgba(130, 87, 255, 0.5);
}

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

.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px 0;
    font-family: inherit;
}

.mobile-friendly-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--glass-bg, #fff8);
    border-radius: 12px;
    padding: 10px 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 36px;
    padding: 7px 12px;
    margin: 0 2px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    color: var(--text-color, #333);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.pagination a:hover {
    background: var(--accent-color, #8257ff);
    color: #fff;
    box-shadow: 0 2px 8px rgba(130,87,255,0.08);
}

.pagination .active {
    background: var(--accent-color, #8257ff);
    color: #fff;
    font-weight: bold;
    cursor: default;
    box-shadow: 0 2px 8px rgba(130,87,255,0.12);
}

.pagination .disabled {
    color: #bbb;
    background: #f3f3f3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .dots {
    color: #aaa;
    padding: 0 6px;
    font-size: 18px;
    user-select: none;
}

@media (max-width: 600px) {
    .mobile-friendly-pagination {
        padding: 8px 6px;
        gap: 2px;
    }
    .pagination a,
    .pagination span {
        min-width: 28px;
        padding: 5px 7px;
        font-size: 14px;
        border-radius: 6px;
    }
}

/* Mobile tap indicator */
.tap-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 3;
    pointer-events: none;
}

.movie-card.tapped .tap-indicator {
    opacity: 0;
}

.movie-card:not(.tapped):active .tap-indicator {
    opacity: 1;
}

/* Add a play icon overlay for tapped cards on mobile */
.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3;
    pointer-events: none;
}

.play-indicator:after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent white;
    margin-left: 2px;
}

.movie-card.tapped .play-indicator {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
}

/* Animation for button indicators */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.video-banner-content .play-pause-btn,
.video-banner-content .sound-toggle-btn {
    transition: all 0.3s ease;
}

.video-banner-content .play-pause-btn:hover,
.video-banner-content .sound-toggle-btn:hover {
    animation: none !important; /* Stop pulsing on hover */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-bar {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }
}

@media (max-width: 576px) {
    header {
        flex-direction: column;
        align-items: stretch;
        padding-left: 0;
        padding-right: 0;
    }
    .logo {
        width: 100%;
        margin-bottom: 2px;
        display: flex;
        justify-content: center;
    }
    .search-bar {
        width: 100%;
        margin: 1px 0 !important;
        padding: 0 2px !important;
    }
    .user-actions {
        width: 100%;
        justify-content: space-between;
        gap: 2px !important;
        padding: 0 2px !important;
        margin: 2px 0 0 0 !important;
    }
    .user-actions a {
        padding: 8px 10px;
        font-size: 14px;
        gap: 4px;
        margin: 0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        /* margin-bottom: 18px; */
        /* padding: 0 4px; */
    }
    .page-title h2 {
        font-size: 20px;
    }
    .filter-options {
        width: 100%;
        gap: 8px;
        padding-bottom: 4px;
        margin-bottom: 0;
    }
    .filter-options select {
        padding: 8px 10px;
        font-size: 14px;
        border-radius: 8px;
        min-width: 0;
    }
    .category-tags {
        gap: 6px;
        margin: 10px 0 18px 0;
        padding: 0 4px;
    }
    .category-tag {
        padding: 7px 10px;
        font-size: 12px;
        border-radius: 8px;
        gap: 4px;
    }
    .category-tag::before {
        width: 6px;
        height: 6px;
    }
}

.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 15px;

}

.banner-content {
    width: 100%;
    /* height: 250px; */
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(130, 87, 255, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCBvcGFjaXR5PSIwLjEiIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIGZpbGw9IiNmZmYiLz48L3N2Zz4=');
    opacity: 0.15;
    z-index: 1;
}

.banner-text {
    padding: 30px 50px;
    color: white;
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.banner-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.banner-content a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .banner-content {
        height: 180px;
    }
    
    .banner-text {
        padding: 20px;
    }
    
    .banner-text h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .banner-container {
        margin-top: 6px !important;
        margin-bottom: 20px !important;
        padding-top: 0 !important;
    }
    
    .banner-content {
        height: 160px;
    }
    
    .banner-text {
        padding: 15px;
    }
    
    .banner-text h3 {
        font-size: 18px;
    }
}

/* Existing CSS below */
.banner-placeholder {
    width: 100%;
    height: 250px;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 18px;
    border-radius: 4px;
    position: relative;
}

.banner-placeholder::after {
    content: "Banner Placeholder";
    position: absolute;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .banner-placeholder {
        height: 120px;
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Video Banner Styles */
.video-banner {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 15px;
    position: relative;
}

.video-banner-content {
    width: 100%;
    aspect-ratio: 21/9; /* Fixed 21:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.video-banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.video-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 2;
}

.video-banner-content .play-pause-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-banner-content .play-pause-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

.video-banner-content .play-pause-btn i {
    font-size: 18px;
    color: #333;
}

.video-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.video-banner-content .sound-toggle-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-banner-content .sound-toggle-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

.video-banner-content .sound-toggle-btn i {
    font-size: 18px;
    color: #333;
}

/* Animation for button indicators */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.video-banner-content .play-pause-btn,
.video-banner-content .sound-toggle-btn {
    transition: all 0.3s ease;
}

.video-banner-content .play-pause-btn:hover,
.video-banner-content .sound-toggle-btn:hover {
    animation: none !important; /* Stop pulsing on hover */
}

/* Responsive adjustments for video banner */
@media (max-width: 768px) {
    .video-banner {
        margin: 15px auto 25px;
        padding: 0 10px;
    }
    
    .video-banner-content .play-pause-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .video-banner-content .play-pause-btn i {
        font-size: 14px;
    }
    
    .video-banner-content .sound-toggle-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        left: 15px;
    }
    
    .video-banner-content .sound-toggle-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-banner {
        margin: 10px auto 20px;
        padding: 0 5px;
    }
}
