/* Slideshow Styles */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto 40px;
    overflow: hidden;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.slideshow {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
    height: 1000px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: white;
    z-index: 2;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.slide-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-info {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #ddd;
    flex-wrap: wrap;
}

.slide-rating {
    color: #ffc107;
}

.slide-overview {
    max-width: 60%;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.badge-movie-slide {
    background: #e74c3c;
}

.badge-tv-slide {
    background: #3498db;
}

.slide-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    margin-right: 10px;
}

.slide-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.slide-btn-info {
    background: rgba(255,255,255,0.2);
}

.slide-btn-info:hover {
    background: rgba(255,255,255,0.3);
}

/* Navigation buttons */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: 0.3s;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev:hover, .next:hover {
    background: rgba(0,0,0,0.8);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* Dots */
.dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

.dot.active {
    background: #e74c3c;
    width: 30px;
    border-radius: 10px;
}

/* Slideshow Title Section */
.slideshow-header {
    text-align: center;
    margin: 20px 0 10px;
}

.slideshow-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slideshow-header p {
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .slide {
        height: 400px;
    }
    .slide-title {
        font-size: 1.5rem;
    }
    .slide-overview {
        max-width: 100%;
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    .slide-info {
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 10px;
    }
    .slide-content {
        padding: 20px;
    }
    .prev, .next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .slideshow-header h2 {
        font-size: 1.5rem;
    }
}

/* Search Result Styles */
.search-result {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px auto;
    max-width: 900px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.search-result h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.search-result img {
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.search-result p {
    margin: 8px 0;
    line-height: 1.5;
}

.language-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    background: #0f3460;
    color: white;
    margin: 10px 5px;
    cursor: pointer;
}

.language-select option[selected] {
    background: #e74c3c;
}

.detected-language-info {
    display: inline-block;
    background: #27ae60;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    color: white;
}

.search-result button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 5px;
}

.search-result button:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.success-message, .error-message {
    padding: 15px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
}

.success-message {
    background: #27ae60;
    color: white;
}

.error-message {
    background: #e74c3c;
    color: white;
}

/* New Badge for Slideshow */
.new-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
    animation: pulse 1.5s infinite;
}

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

/* Grid layout for 8 items per row on desktop */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 450px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.card img {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: cover;
}

.movie-info {
    padding: 12px;
}

.movie-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-rating {
    color: #ffc107;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.movie-year {
    color: #888;
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.movie-runtime {
    color: #00BCD4;
    font-size: 0.7rem;
    margin-bottom: 3px;
}

.movie-genres {
    color: #aaa;
    font-size: 0.7rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-language-badge {
    display: inline-block;
    background: #3498db;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    margin-bottom: 8px;
    color: white;
}

.media-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.badge-movie {
    background: #e74c3c;
}

.badge-tv {
    background: #3498db;
}

/* Updated Download Options - No dropdown, show all qualities directly */
.download-options {
    margin-top: 8px;
}

.download-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.08);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background 0.3s;
    text-decoration: none;
    color: #fff;
    font-size: 0.7rem;
}

.download-link-item:hover {
    background: rgba(255,255,255,0.15);
}

.download-link-item .quality {
    font-weight: bold;
    color: #ffc107;
    font-size: 0.75rem;
}

.download-link-item .file-size {
    color: #4CAF50;
    font-size: 0.7rem;
    background: rgba(76, 175, 80, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

.download-link-item .download-icon {
    color: #2196F3;
    font-size: 0.8rem;
}

.download-link-item:hover .download-icon {
    color: #ffc107;
}

.coming-soon-btn {
    width: 100%;
    padding: 6px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.7rem;
    cursor: default;
    font-weight: bold;
    text-align: center;
    opacity: 0.8;
}

.watch-btn {
    width: 100%;
    padding: 6px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.7rem;
    cursor: pointer;
}

.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.category-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.category-title a:hover {
    color: #e74c3c;
}

/* Language filter bar */
.language-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 30px 20px 20px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 50px;
}

.language-filter-btn {
    padding: 8px 20px;
    border-radius: 30px;
    background: #1a1a2e;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
    border: 1px solid #333;
}

.language-filter-btn:hover {
    background: #e74c3c;
    transform: translateY(-2px);
}

.language-filter-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
}

.language-filter-btn i {
    margin-right: 8px;
}

.filter-header {
    text-align: center;
    margin: 20px 0 10px;
}

.filter-header h3 {
    font-size: 1.2rem;
    color: #ddd;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px;
    background: #1a1a2e;
    border-radius: 15px;
    margin: 30px 0;
}

.empty-state p {
    color: #aaa;
    margin: 10px 0;
    line-height: 1.6;
}

/* Hover info panel for cards */
.card-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 100%);
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
    border-radius: 0 0 10px 10px;
}

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

.hover-text {
    font-size: 0.7rem;
    color: #ddd;
    margin: 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hover-text i {
    width: 16px;
    margin-right: 5px;
}

/* Pagination */
.pagination-container {
    text-align: center;
    margin: 40px 0 20px;
}

.pagination {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    background: #1a1a2e;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #e74c3c;
}

.pagination .active {
    background: #e74c3c;
}

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

.pagination-info {
    margin-top: 15px;
    color: #888;
    font-size: 0.85rem;
}

.page-prev, .page-next {
    font-weight: bold;
}

/* Language detection badge in search result */
.detected-language-badge {
    background: #27ae60;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    display: inline-block;
}

/* Download options container inside card */
.download-links-container {
    max-height: 80px;
    overflow-y: auto;
    margin-top: 4px;
}

.download-links-container::-webkit-scrollbar {
    width: 3px;
}

.download-links-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.download-links-container::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 10px;
}

.download-label {
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 3px;
    display: block;
}

.no-links-text {
    color: #f39c12;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    padding: 4px;
    background: rgba(243, 156, 18, 0.15);
    border-radius: 4px;
    border: 1px dashed #f39c12;
}