body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, rgb(31, 29, 43) 0%, rgb(20, 19, 30) 100%) !important;
    color: #e8e8e8 !important;
    padding-bottom: 80px; /* Отступ для нижней навигации */
    min-height: 100vh;
}

/* Убираем белый фон у всех элементов Tailwind */
* {
    box-sizing: border-box;
}

a, div, section, article, main {
    background-color: transparent;
}

/* Header with User Greeting */
.header-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgb(31, 29, 43);
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #ff6b35;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-text h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.user-text p {
    margin: 0;
    font-size: 12px;
    color: #a0a0a0;
}

.header-heart {
    color: #ff6b35;
    font-size: 20px;
}

/* Search Bar */
.search-container {
    padding: 0 20px 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(60, 60, 80, 0.4));
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 14px 18px;
    gap: 12px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar:focus-within {
    border-color: rgba(78, 205, 196, 0.5);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
}

.search-bar i {
    color: #a0a0a0;
    font-size: 16px;
}

.search-form {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    outline: none;
    width: 100%;
}

.search-input::placeholder {
    color: #a0a0a0;
}

.filter-icon {
    color: #a0a0a0;
    font-size: 16px;
}

/* Banner Carousel */
.banner-carousel {
    position: relative;
    height: 300px;
    margin: 0 20px 30px;
    border-radius: 15px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.banner-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #ff6b35;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.indicator.active {
    background-color: white;
}

/* Section Container */
.section-container {
    margin: 0 20px 25px;
}

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

.section-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-header h3::before,
.section-header h3::after {
    content: none !important;
    display: none !important;
}

.view-all {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(78, 205, 196, 0.3));
}

.view-all:hover {
    color: #5562e7;
    transform: translateX(4px);
}

/* Horizontal Scroll */
.horizontal-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(42, 42, 42, 0.4);
    border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #4ecdc4, #5562e7);
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #5562e7, #4ecdc4);
}

.movie-card {
    flex-shrink: 0;
    width: 140px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background-color: transparent !important;
    position: relative;
}

.movie-card:hover {
    transform: scale(1.08) translateY(-4px);
}

.movie-card:hover .movie-poster {
    box-shadow: 0 12px 28px rgba(78, 205, 196, 0.3), 0 6px 12px rgba(0, 0, 0, 0.4);
}

.movie-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    background-color: transparent !important;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-info {
    pointer-events: none;
    background-color: transparent !important;
}

.movie-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white !important;
    line-height: 1.2;
    background-color: transparent !important;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.movie-rating i {
    color: #ffd700;
    font-size: 12px;
}

.movie-rating span {
    font-size: 12px;
    color: #a0a0a0;
}

.movie-genre {
    font-size: 11px;
    color: #a0a0a0 !important;
    margin: 0;
    line-height: 1.2;
    background-color: transparent !important;
}

/* Genres */
.genres-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.genres-container::-webkit-scrollbar {
    height: 4px;
}

.genres-container::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 2px;
}

.genres-container::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 2px;
}

.genre-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.6), rgba(60, 60, 80, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: #b8b8b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.genre-btn.active {
    background: linear-gradient(135deg, #4ecdc4, #5562e7);
    color: white;
    border-color: rgba(78, 205, 196, 0.3);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.genre-btn:hover {
    background: linear-gradient(135deg, rgba(60, 60, 80, 0.6), rgba(80, 80, 100, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.genre-btn.active:hover {
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.6);
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 10px;
}

@media (min-width: 768px) {
    .collection-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .collection-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px 100px;
}

.grid-movie-card {
    background-color: transparent !important;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
    cursor: pointer;
}

.grid-movie-card:hover {
    transform: scale(1.02);
}

.grid-poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background-color: transparent !important;
}

.grid-movie-info {
    padding: 12px;
    pointer-events: none;
    background-color: transparent !important;
}

.grid-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: white !important;
    line-height: 1.2;
    background-color: transparent !important;
}

.grid-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.grid-rating i {
    color: #ffd700;
    font-size: 12px;
}

.grid-rating span {
    font-size: 12px;
    color: #a0a0a0;
}

.grid-genre {
    font-size: 11px;
    color: #a0a0a0 !important;
    margin: 0;
    line-height: 1.2;
    background-color: transparent !important;
}

.header {
    background-color: #333;
    padding: 10px;
    text-align: center;
}

.search-bar {
    width: 90%;
    padding: 8px;
    border-radius: 5px;
    border: none;
}

.banner {
    background-color: #222;
    color: #fff;
    text-align: center;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.banner::before {
    content: "";
    background-image: url('/static/images/daria_1.webp');
    background-size: contain; /* Изображение полностью видно */
    background-position: center; /* Центрируем изображение */
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* За баннером */
    opacity: 0.8; /* Добавим небольшую прозрачность */
}

.movie-promo {
    display: none;
    position: absolute; /* Абсолютное позиционирование для перекрытия слайдов */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Устанавливаем высоту слайда */
    background: rgba(0, 0, 0, 0.5); /* Затемнение */
    z-index: 2;
    display: flex; /* Используем Flexbox для центрирования */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.movie-promo.active {
    display: flex; /* Меняем с display: block на flex */
}

.movie-promo h1 {
    font-size: 24px;
    margin: 0;
    color: #fff;
    z-index: 3;
}

.movie-promo button {
    padding: 10px 20px;
    border: none;
    background-color: #ff6f61;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    z-index: 3;
    margin-top: 20px; /* Добавим отступ сверху, чтобы не было слишком близко к заголовку */
}

/* Медиазапросы для больших экранов */
@media (min-width: 768px) {
    .banner {
        height: 500px; /* Увеличиваем высоту баннера */
    }

    .movie-promo h1 {
        font-size: 32px; /* Увеличиваем размер шрифта для заголовков */
    }
}

@media (min-width: 1200px) {
    .banner {
        height: 600px; /* Ещё больше увеличиваем высоту баннера */
    }

    .movie-promo h1 {
        font-size: 36px; /* Ещё больше увеличиваем размер шрифта для заголовков */
    }
}

.carousel-buttons {
    position: absolute;
    top: 50%;
    width: 96%; /* Измененная ширина */
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    left: 2%; /* Центрирование */
}

.carousel-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.carousel-button#prev {
    left: 10px; /* Задано значение */
}

.carousel-button#next {
    right: 10px; /* Задано значение */
}

.free-section {
    background-color: #fff;
    padding: 20px;
    text-align: center;
}

.free-section .dates span {
    display: inline-block;
    margin: 0 10px;
}

.additional-items {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.item {
    flex: 0 0 25%;
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box;
    margin: 0 5px; /* Добавленный отступ */
}

.carousel-buttons-inner {
    position: absolute;
    top: 50%;
    width: 96%; /* Измененная ширина */
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    left: 2%; /* Центрирование */
}

.carousel-button-inner {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
}

.carousel-button-inner#prev-inner {
    left: 10px;
}

.carousel-button-inner#next-inner {
    right: 10px;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 0;
    background: linear-gradient(135deg, rgba(31, 29, 43, 0.95), rgba(41, 39, 56, 0.95));
    border-top: 1px solid rgba(78, 205, 196, 0.25);
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    height: 70px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b8b8b8;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    position: relative;
}

.nav-item:hover {
    color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(85, 98, 231, 0.1));
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.nav-item.active {
    color: #4ecdc4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(85, 98, 231, 0.15));
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #4ecdc4, #5562e7);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.5);
}

.nav-item i {
    font-size: 24px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
    display: none;
}

/* Адаптивные стили для постеров */
@media (max-width: 768px) {
    .movie-poster {
        height: 250px;
    }
    
    .grid-poster {
        height: 180px;
    }
    
    .banner-carousel {
        height: 250px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .movie-poster {
        height: 280px;
    }
    
    .grid-poster {
        height: 200px;
    }
}

@media (min-width: 1025px) {
    .movie-poster {
        height: 300px;
    }
    
    .grid-poster {
        height: 220px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
