:root {
    --primary: #e50914;
    --dark: #141414;
    --light: #f3f3f3;
    --gray: #999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    padding: 20px 50px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, rgba(0,0,0,0));
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s;
}

header.scrolled {
    background-color: var(--dark);
}

.logo {
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(20,20,20,1) 0%, rgba(20,20,20,0) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.btn:hover {
    opacity: 0.8;
}

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

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

/* Content Sections */
.content-section {
    padding: 50px;
    margin-top: -100px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.content-row {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
}

.content-row::-webkit-scrollbar {
    display: none;
}

.content-item {
    min-width: 200px;
    transition: transform 0.3s;
    cursor: pointer;
}

.content-item:hover {
    transform: scale(1.05);
}

.content-item img {
    width: 100%;
    border-radius: 4px;
}

/* Catalog Page Styles */
.catalog-header {
    padding: 150px 50px 50px;
    background: linear-gradient(to bottom, var(--dark), rgba(20,20,20,0));
}

.catalog-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.catalog-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-btn {
    background: none;
    border: 1px solid var(--gray);
    color: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 50px 50px;
}

/* Footer */
footer {
    padding: 50px;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Loading Spinner */
.spinner {
    display: none;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}


/* Details Page Styles */
.details-page {
    background-color: var(--dark);
}

.content-details {
    padding: 150px 50px 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.details-header {
    display: flex;
    gap: 30px;
}

.details-poster {
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.details-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.details-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.details-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

.details-rating {
    color: #ffd700;
}

.details-overview {
    line-height: 1.6;
    max-width: 800px;
}

.details-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.trailer-container {
    margin-top: 30px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Search Page Styles */
.search-container {
    display: flex;
    padding: 150px 50px 20px;
    max-width: 800px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--gray);
    border-radius: 4px 0 0 4px;
    color: white;
    font-size: 1rem;
}

#searchButton {
    padding: 0 20px;
    background: var(--primary);
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
}

.search-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.search-results {
    padding: 0 50px 50px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .hero {
        padding: 0 20px;
        height: 60vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .content-section, .catalog-header {
        padding: 20px;
    }
    
    .details-header {
        flex-direction: column;
    }
    
    .details-poster {
        width: 100%;
        min-width: auto;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 0 20px 20px;
    }
}

/* Добавьте эти стили в конец файла */

/* Cast section styles */
.cast-row {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.cast-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.cast-item {
    min-width: 120px;
    text-align: center;
    flex-shrink: 0;
}

.cast-item img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--primary);
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    grid-column: 1 / -1;
}

.pagination button {
    padding: 8px 16px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--dark);
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light);
}

.close-modal:hover {
    color: var(--primary);
}

.trailer-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-top: 20px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Remove from list button */
.remove-from-list {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.content-item:hover .remove-from-list {
    opacity: 1;
}

.remove-from-list:hover {
    background-color: var(--primary);
}

/* Tertiary button style */
.btn-tertiary {
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-tertiary:hover {
    background-color: rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.5);
}


