:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #141414;
    --accent-color: #e50914;
    --accent-hover: #f40d18;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --card-bg: #1a1a1a;
    --hover-bg: #252525;
    --gradient-dark: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
}

.navbar {
    background-color: var(--secondary-bg);
    border-bottom: 1px solid var(--hover-bg);
}

.navbar-brand {
    color: var(--accent-color) !important;
    font-weight: 700;
    font-size: 2.5rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-primary) !important;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

.card {
    background-color: var(--card-bg);
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

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

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.new-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-hover));
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(229, 9, 20, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    }
}

.card-body {
    position: relative;
    z-index: 2;
    padding: 15px;
    background: linear-gradient(0deg, var(--card-bg) 0%, transparent 100%);
}

.card-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.movie-card, .series-card {
    height: 100%;
}

.movie-card img, .series-card img {
    height: 320px;
    object-fit: cover;
    transition: transform 0.5s ease;
    width: 100%;
}

.category-badge {
    background-color: var(--accent-color);
    color: var(--text-primary);
}

.rating-badge, .genre-badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

/* Modern Search Box Styles */
.search-container {
    background: rgba(20, 20, 20, 0.7);
    padding: 20px;
    border-radius: 25px;
    margin-bottom: 40px;
    max-width: 900px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.search-container:hover {
    background: rgba(25, 25, 25, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 850px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--accent-color);
    font-size: 1.2rem;
    z-index: 1;
    transition: color 0.3s ease;
}

.search-input {
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    color: var(--text-primary);
    padding: 18px 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 15px;
    width: 100%;
    letter-spacing: 0.3px;
}

.search-input:focus {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.15);
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

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

.btn-clear-search {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    opacity: 0.7;
}

.btn-clear-search:hover {
    color: var(--accent-color);
    background-color: rgba(229, 9, 20, 0.1);
    opacity: 1;
}

.search-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.1rem;
    margin-top: 10px;
    background-color: var(--card-bg);
    padding: 12px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

.modal-content {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #ff0a16;
    border-color: #ff0a16;
}

.category-filter {
    margin-bottom: 20px;
}

.category-filter .btn {
    margin: 5px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--hover-bg);
}

.category-filter .btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Loading spinner */
.spinner-border {
    color: var(--accent-color);
    width: 3rem;
    height: 3rem;
}

h2 {
    color: var(--text-primary);
    font-weight: 500;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

#no-results {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Slider Styles */
.slider-container {
    position: relative;
    margin-bottom: 50px;
    padding: 15px 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slider-container[style*="display: none"] {
    opacity: 0;
    transform: translateY(20px);
}

.slider-container[style*="display: block"] {
    opacity: 1;
    transform: translateY(0);
}

.slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 25px;
    padding: 20px 5px;
}

.slider-wrapper::-webkit-scrollbar {
    display: none;
}

.slider-item {
    flex: 0 0 auto;
    width: 280px;
    transform: translateZ(0);
    transition: transform 0.3s ease;
}

.slider-controls {
    display: flex;
    gap: 15px;
}

.btn-slider {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 1;
}

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

.btn-slider:not(:disabled):hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.card:hover img {
    transform: scale(1.1);
}

.section-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Loading Spinner */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#loading[style*="display: none"] {
    opacity: 0;
    transform: translate(-50%, -40%);
    pointer-events: none;
}

#loading[style*="display: flex"] {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-container {
        width: 95%;
        padding: 15px;
    }

    .search-input {
        padding: 15px 45px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .search-container {
        width: 100%;
        padding: 12px;
        border-radius: 20px;
    }

    .search-input {
        padding: 12px 40px;
        font-size: 0.95rem;
    }
}

.logo-img {
    max-height: 150px;
    width: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 8px rgba(229, 9, 20, 0.3));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-item {
    animation: fadeIn 0.6s ease-out;
}

/* Search Results */
#search-results {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#search-results[style*="display: none"] {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#search-results[style*="display: flex"] {
    opacity: 1;
    transform: translateY(0);
}

/* No Results Message */
#no-results {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#no-results[style*="display: none"] {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#no-results[style*="display: flex"] {
    opacity: 1;
    transform: translateY(0);
}

/* Search Spinner */
.search-spinner[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.search-spinner[style*="display: block"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.4);
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
} 