/* Custom styles for FMovies */

/* Movie Card Styles */
.movie-card {
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 100%;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-card a {
    text-decoration: none;
    display: block;
    position: relative;
}

.movie-poster {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2/3;
    border-radius: 8px;
    object-fit: cover;
    display: block !important;
    transition: transform 0.3s ease;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    min-height: 270px;
    max-width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
}

.rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 172, 193, 0.95);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.movie-info {
    margin-top: 10px;
    padding: 0 4px;
}

.movie-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.movie-meta {
    font-size: 12px;
    color: #8e95a5;
    margin: 0;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 172, 193, 0.3);
    border-top-color: #00acc1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination Styles */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 40px 0;
    padding: 20px;
}

#pagination button {
    padding: 10px 20px;
    background: #00acc1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#pagination button:hover:not(:disabled) {
    background: #008a9a;
    transform: translateY(-2px);
}

#pagination button:disabled {
    background: #495057;
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    color: #8e95a5;
    font-size: 14px;
    font-weight: 500;
}

/* Slider Styles */
.slider-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slider-item.active {
    opacity: 1;
}

.slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.9), transparent);
}

.slider-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    max-width: 50%;
    z-index: 1;
}

.slider-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.slider-meta {
    margin-bottom: 15px;
}

.slider-meta span {
    margin-right: 15px;
    color: #fff;
}

.slider-overview {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Section Titles */
.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #00acc1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00acc1;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .slider-container {
        height: 300px;
    }

    .slider-content {
        bottom: 20px;
        left: 20px;
        max-width: 80%;
    }

    .slider-title {
        font-size: 24px;
    }

    .slider-overview {
        font-size: 14px;
        display: none;
    }

    .movie-title {
        font-size: 11px !important;
        line-height: 1.3;
    }

    .movie-year {
        font-size: 10px !important;
    }
    
    .movie-card {
        margin-bottom: 0.75rem;
    }
    
    .movie-info {
        margin-top: 0.5rem !important;
    }
    
    .movie-poster {
        border-radius: 6px;
    }
}

@media (max-width: 576px) {
    .movie-title {
        font-size: 10px !important;
    }
    
    .movie-year {
        font-size: 9px !important;
    }
    
    .rating {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

/* Pagination Styles */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: #00acc1;
    background-color: #1e2028;
    border-color: #495057;
}

.page-link:hover {
    color: #fff;
    background-color: #00acc1;
    border-color: #00acc1;
}

.page-item.active .page-link {
    background-color: #00acc1;
    border-color: #00acc1;
}

/* Filter Styles */
.filter-section {
    background: #1e2028;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filter-section select {
    background: #13151a;
    color: #8e95a5;
    border: 1px solid #495057;
}

.filter-section select:focus {
    background: #13151a;
    color: #8e95a5;
    border-color: #00acc1;
}

/* Details Page Styles */
.details-header {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.details-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.95));
}

.details-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 1;
}

.details-poster {
    width: 200px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.details-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.details-meta {
    margin-bottom: 15px;
}

.details-meta span {
    margin-right: 15px;
    color: #e0e0e0;
}

.details-overview {
    color: #e0e0e0;
    line-height: 1.6;
    max-width: 800px;
}

.cast-member {
    text-align: center;
    margin-bottom: 20px;
}

.cast-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.cast-name {
    font-size: 14px;
    color: #fff;
    margin-bottom: 5px;
}

.cast-character {
    font-size: 12px;
    color: #8e95a5;
}

/* Video Player */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Search Results */
.search-results-header {
    background: #1e2028;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.search-results-title {
    font-size: 24px;
    color: #00acc1;
    margin: 0;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: #1e2028;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 0.5rem;
    z-index: 1000;
    min-width: 10rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #8e95a5;
    text-decoration: none;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #13151a;
    color: #00acc1;
}

/* Mobile dropdown improvements */
@media (max-width: 991px) {
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
        margin-top: 0.5rem;
    }
    
    .dropdown-toggle {
        width: 100%;
        text-align: left;
    }
}

/* Genre Badge */
.genre-badge {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    background: #00acc1;
    color: #000;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #495057;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 24px;
    color: #8e95a5;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #6c757d;
}
