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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Обертка страницы */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Боковые панели для рекламы */
.ad-sidebar {
    width: 20%;
    min-width: 200px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    transition: width 0.3s ease, transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.ad-sidebar-left {
    left: 0;
    border-right: 2px solid #e0e0e0;
}

.ad-sidebar-right {
    right: 0;
    border-left: 2px solid #e0e0e0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.ad-placeholder {
    background: rgba(250, 250, 250, 0.9);
    border: 2px dashed #d0d0d0;
    padding: 0;
    text-align: center;
    color: #666;
    height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.ad-banner-image-sidebar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-placeholder p {
    margin: 10px 0;
    font-size: 18px;
}

.ad-note {
    font-size: 14px !important;
    color: #999 !important;
}

/* Контент рекламных панелей */
.ad-content {
    width: 100%;
    height: 100%;
    padding: 15px;
    overflow-y: auto;
}

.ad-headers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ad-header-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-header-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.ad-header-item:hover {
    border-color: #ff6b6b;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
    transform: translateX(3px);
}

.ad-header-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ad-header-item p {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* Основной контент */
.main-wrapper {
    flex: 1;
    margin-left: 20%;
    margin-right: 20%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, margin-right 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    color: #ff6b6b;
    font-size: 28px;
    font-weight: bold;
    text-shadow: none;
}

.nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #ff6b6b;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input {
    padding: 10px 15px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 25px;
    color: #333;
    font-size: 14px;
    width: 250px;
    outline: none;
}

.search-box input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.search-btn {
    background: #ff6b6b;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #ff5252;
}

/* Hero Section */
.hero-section {
    margin: 30px 0;
}

.hero-slider {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 500px;
}

.hero-slide {
    display: flex;
    height: 100%;
    position: relative;
}

.hero-content {
    flex: 1;
    padding: 60px 40px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #333;
    text-shadow: none;
}

.hero-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.hero-description {
    max-width: 600px;
    margin: 20px 0;
    line-height: 1.8;
}

.hero-poster {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: #ff6b6b;
    color: #fff;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 1px solid #d0d0d0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #ff6b6b;
}

/* Рекламные баннеры между разделами */
.ad-banner {
    width: 100%;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-banner-placeholder {
    background: rgba(250, 250, 250, 0.9);
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #666;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-banner-placeholder p {
    margin: 5px 0;
    font-size: 18px;
}

/* Контент рекламных баннеров */
.ad-banner-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 20px 30px;
    width: 100%;
    max-width: 728px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
    transition: all 0.3s ease;
}

.ad-banner-content:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.25);
    transform: translateY(-2px);
    border-color: #ff5252;
}

.ad-banner-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.ad-banner-image {
    width: 400px;
    height: 300px;
    object-fit: contain;
    flex-shrink: 0;
}

.ad-banner-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ad-banner-link p {
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.read-more {
    color: #ff6b6b;
    font-weight: bold;
    font-style: italic;
    margin-left: 5px;
}

/* Movies Section */
.movies-section {
    margin: 50px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 25px;
    color: #333;
    border-left: 4px solid #ff6b6b;
    padding-left: 15px;
}

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

.movie-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
}

.movie-poster {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.movie-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
}

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

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.movie-rating {
    color: #ffa500;
    font-weight: bold;
}

.movie-year {
    color: #999;
}

/* Footer */
.footer {
    background: #ffffff;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.footer p {
    color: #666;
    margin: 5px 0;
}

.disclaimer {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: color 0.3s;
}

.close:hover {
    color: #ff6b6b;
}

#modalMovieInfo {
    color: #333;
}

/* Responsive - Адаптивные боковые панели */
@media (max-width: 1800px) and (min-width: 1600px) {
    .ad-sidebar {
        width: 18%;
        min-width: 250px;
        max-width: 300px;
    }

    .main-wrapper {
        margin-left: 18%;
        margin-right: 18%;
    }
}

@media (max-width: 1600px) and (min-width: 1400px) {
    .ad-sidebar {
        width: 15%;
        min-width: 200px;
        max-width: 250px;
    }

    .main-wrapper {
        margin-left: 15%;
        margin-right: 15%;
    }
}

@media (max-width: 1400px) and (min-width: 1200px) {
    .ad-sidebar {
        width: 12%;
        min-width: 150px;
        max-width: 200px;
    }

    .main-wrapper {
        margin-left: 12%;
        margin-right: 12%;
    }
}

@media (max-width: 1200px) {
    .ad-sidebar {
        width: 0;
        min-width: 0;
        max-width: 0;
        overflow: hidden;
        transform: translateX(-100%);
    }

    .ad-sidebar-right {
        transform: translateX(100%);
    }

    .main-wrapper {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-slider {
        height: 400px;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .movie-poster {
        height: 220px;
    }
}

