/* 
 * Kinosite - Custom Styles
 * Темная тема в стиле Netflix
 */

/* === Global Styles === */
:root {
    --primary-color: #E50914;
    --secondary-color: #221f1f;
    --background-dark: #121212;
    --background-light: #181818;
    --text-white: #FFFFFF;
    --text-gray: #B3B3B3;
    --hover-color: #E50914;
    --card-bg: #1f1f1f;
    --gradient-overlay: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

body {
    font-family: 'Roboto', 'Noto Sans', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* === Navigation === */
.navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 15px 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color) !important;
    letter-spacing: 1px;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff4d4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-white) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Search Form */
.search-form {
    width: 350px;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border-radius: 25px 0 0 25px;
    padding: 8px 20px;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

.search-input::placeholder {
    color: var(--text-gray);
}

.btn-search {
    background: var(--primary-color);
    border: none;
    color: var(--text-white);
    border-radius: 0 25px 25px 0;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: #f40612;
    transform: scale(1.05);
}

/* User Avatar */
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

/* === Main Content === */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 350px);
}

/* === Hero Slider === */
.hero-slider {
    position: relative;
    height: 600px;
    margin-bottom: 40px;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: var(--text-gray);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
}

.rating-stars {
    color: #ffc107;
}

/* === Buttons === */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 35px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.4);
}

.btn-outline-light {
    border: 2px solid var(--text-white);
    padding: 10px 30px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--text-white);
    color: var(--background-dark);
    transform: translateY(-2px);
}

/* === Movie/Series Cards === */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.movie-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.movie-poster {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.movie-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-white);
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffc107;
}

.movie-genres {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.genre-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* === Section Headers === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -15px;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.view-all-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    transform: translateX(5px);
}

/* === Filters Sidebar === */
.filters-sidebar {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.form-check {
    margin-bottom: 10px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-select,
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.form-select:focus,
.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

/* === Footer === */
.footer {
    background: var(--secondary-color);
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 3px solid var(--primary-color);
}

.footer h5,
.footer h6 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer ul {
    padding-left: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: var(--text-white);
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer p {
    color: var(--text-white) !important;
}

.footer .text-light {
    color: var(--text-white) !important;
}

/* === Filters Sidebar === */
.filters-sidebar {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-title {
    color: var(--text-white);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h6 {
    color: var(--text-white);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
}

.filter-group .form-check {
    margin-bottom: 10px;
}

.filter-group .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.filter-group .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-group .form-check-label {
    color: var(--text-white);
    cursor: pointer;
    font-size: 0.95rem;
    margin-left: 5px;
}

.filter-group .form-check-label:hover {
    color: var(--primary-color);
}

.filter-group .form-control,
.filter-group .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    font-size: 0.95rem;
}

.filter-group .form-control:focus,
.filter-group .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--text-white);
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.25);
}

.filter-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* === Cookie Consent === */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.98);
    padding: 20px 0;
    z-index: 9999;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

/* === Pagination === */
.pagination {
    margin-top: 40px;
    justify-content: center;
}

.page-link {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    margin: 0 5px;
    border-radius: 5px;
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }
    
    .hero-slide {
        height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .search-form {
        width: 100%;
        margin-top: 10px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
}

/* === Loading Animation === */
.loader {
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

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

/* === Smooth Scrolling === */
html {
    scroll-behavior: smooth;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f40612;
}

/* === Custom Select Styles === */
.form-select {
    background-color: var(--card-bg) !important;
    border: 1px solid #444 !important;
    color: var(--text-white) !important;
}

.form-select:focus {
    background-color: var(--card-bg) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.25) !important;
    color: var(--text-white) !important;
}

.form-select option {
    background-color: var(--card-bg) !important;
    color: var(--text-white) !important;
    padding: 8px 12px;
}

.form-select option:hover {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

.form-select option:checked {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

/* Custom dropdown for search page */
.search-page .form-select {
    background-color: var(--background-dark) !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--text-white) !important;
    border-radius: 8px;
}

.search-page .form-select:focus {
    background-color: var(--background-dark) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.3rem rgba(229, 9, 20, 0.4) !important;
    color: var(--text-white) !important;
}

.search-page .form-select option {
    background-color: var(--background-dark) !important;
    color: var(--text-white) !important;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
}

.search-page .form-select option:hover {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

.search-page .form-select option:checked {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
}

/* === Filter Dropdown Styles === */
.filter-group .btn {
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    padding: 8px 16px;
}

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

.filter-group .btn[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.genres-filter-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 10px;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid rgba(229, 9, 20, 0.3);
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.genres-filter-list .form-check {
    margin-bottom: 8px;
    padding: 5px 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.genres-filter-list .form-check-input {
    background-color: var(--background-dark);
    border: 2px solid #444;
    border-radius: 4px;
    margin-left: 0;
    margin-right: 8px;
    flex-shrink: 0;
}

.genres-filter-list .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.genres-filter-list .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.25);
}

.genres-filter-list .form-check-label {
    color: var(--text-white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 8px;
    width: calc(100% - 30px);
    display: inline-block;
}

.genres-filter-list .form-check-label:hover {
    color: var(--primary-color);
}

.countries-filter-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    margin-top: 10px;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid rgba(229, 9, 20, 0.3);
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.countries-filter-list .form-check {
    margin-bottom: 8px;
    padding: 5px 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    display: flex;
    align-items: center;
}

.countries-filter-list .form-check-input {
    background-color: var(--background-dark);
    border: 2px solid #444;
    border-radius: 4px;
    margin-left: 0;
    margin-right: 8px;
    flex-shrink: 0;
}

.countries-filter-list .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.countries-filter-list .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.25);
}

.countries-filter-list .form-check-label {
    color: var(--text-white);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-left: 8px;
    width: calc(100% - 30px);
    display: inline-block;
}

.countries-filter-list .form-check-label:hover {
    color: var(--primary-color);
}

/* No poster placeholder */
.no-poster {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    background-color: var(--card-bg);
    color: var(--text-gray);
    text-align: center;
    border-radius: 8px;
}

.no-poster i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-poster span {
    font-size: 0.9rem;
    opacity: 0.7;
}

