/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #f59e0b;
    --accent-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header Styles */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
    min-width: 0; /* Allows flex items to shrink */
}

.logo {
    flex-shrink: 0;
    min-width: fit-content;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-decoration: none;
    border: none;
    outline: none;
}

.logo i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Removed underline for active nav links */

/* Hide mobile menu toggle on desktop */
.mobile-menu-toggle {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    cursor: pointer;
    opacity: 0.7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 250px;
    opacity: 1;
    cursor: text;
    background-image: none;
    padding-left: 1rem;
}

.search-input:not(:placeholder-shown) {
    width: 250px;
    opacity: 1;
    background-image: none;
    padding-left: 1rem;
}

.search-input::placeholder {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-input:focus::placeholder {
    opacity: 0.6;
}

.search-btn {
    position: absolute;
    right: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-input:focus + .search-btn {
    pointer-events: auto;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.cart-btn,
.user-btn,
.admin-link {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
    padding: 0.4rem;
    border-radius: 50%;
}

/* Hide admin link by default - show only for admins */
.admin-link {
    display: none;
}

.cart-btn:hover,
.user-btn:hover,
.admin-link:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Trailer Modal */
.trailer-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.trailer-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.trailer-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
}

.trailer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--gradient-primary);
    color: white;
}

.trailer-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.trailer-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.trailer-modal-body {
    padding: 0;
    position: relative;
}

.trailer-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.trailer-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.trailer-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
}

.trailer-fallback-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trailer-fallback-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.trailer-fallback-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.trailer-fallback-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.trailer-fallback-link:hover {
    background: var(--primary-dark);
}

/* Trailer Overlay Styles */
.trailer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
}

.movie-poster:hover .trailer-overlay,
.movie-poster-small:hover .trailer-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.trailer-overlay:hover .play-icon {
    transform: scale(1.1);
}

/* Movie Overlay Styles (для совместимости) */
.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
}

.movie-poster:hover .movie-overlay,
.movie-poster-small:hover .movie-overlay {
    opacity: 1;
}

.movie-overlay .play-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.movie-overlay .play-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.movie-overlay .play-btn i {
    margin-left: 2px; /* Смещение иконки для лучшего визуального восприятия */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-image {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    min-height: 400px !important;
    padding: 2rem !important;
    text-align: center !important;
}

.movie-poster {
    position: relative !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-xl) !important;
    transition: transform 0.3s ease !important;
    max-width: 300px !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 400px !important;
}

.movie-poster:hover {
    transform: scale(1.05);
}

.movie-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.play-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 50% !important;
    width: 80px !important;
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

/* Section Styles */
.featured-section,
.categories-section,
.new-releases-section {
    padding: 4rem 0;
}

.featured-section {
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

/* Movie Slider Styles */
.movie-slider-wrapper {
    position: relative;
    margin: 0 -20px;
    padding: 0 20px;
}

.movie-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.movie-slider-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    touch-action: pan-x;
    cursor: grab;
}

.movie-slider-track:active {
    cursor: grabbing;
}

.movie-slider-track .movie-card {
    flex: 0 0 160px; /* Уменьшенный размер карточки */
    min-width: 160px;
    max-width: 160px;
}

.movie-slider-track .movie-poster-small {
    height: 240px; /* Уменьшенная высота постера */
}

.movie-slider-track .movie-info {
    padding: 0.75rem;
}

.movie-slider-track .movie-title {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.movie-slider-track .movie-year,
.movie-slider-track .movie-genre {
    font-size: 0.75rem;
}

.movie-slider-track .movie-price {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.movie-slider-track .add-to-cart {
    padding: 0.4rem;
    font-size: 0.85rem;
}

/* Slider buttons removed - using wheel and swipe only */

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    .movie-slider-wrapper {
        padding: 0 15px;
    }
    
    .movie-slider-track .movie-card {
        flex: 0 0 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    .movie-slider-track .movie-poster-small {
        height: 210px;
    }
}

@media (max-width: 480px) {
    .movie-slider-wrapper {
        padding: 0 10px;
    }
    
    .movie-slider-track .movie-card {
        flex: 0 0 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .movie-slider-track .movie-poster-small {
        height: 180px;
    }
}

.movie-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.movie-poster-small {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster-small img {
    transform: scale(1.1);
}

.movie-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.movie-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.movie-year {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.movie-genre {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.movie-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.movie-card .add-to-cart {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
    margin-top: auto;
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #9ca3af;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    background: #374151;
    color: white;
}

.newsletter-form input::placeholder {
    color: #9ca3af;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-poster {
    width: 60px;
    height: 90px;
    border-radius: 5px;
    overflow: hidden;
}

.cart-item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.checkout-btn {
    width: 100%;
}

/* Movie Modal */
.movie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.movie-modal.open {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 1;
}

.modal-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-poster img {
    width: 100%;
    border-radius: 10px;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        order: 3;
        width: 100%;
    }
    
    .nav-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .search-input {
        width: 50px;
    }
    
    .search-input:focus {
        width: 200px;
    }
    
    .search-input:not(:placeholder-shown) {
        width: 200px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card,
.category-card {
    animation: fadeIn 0.6s ease-out;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Catalog Styles */
.catalog-section {
    padding: 2rem 0 4rem;
    min-height: 80vh;
}

.catalog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.catalog-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.catalog-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.filters-section {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Filter Dropdown Styles */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.filter-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filter-btn.active i {
    transform: rotate(180deg);
}

.filter-btn-text {
    flex: 1;
    text-align: left;
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    min-width: 100%;
}

.filter-dropdown-menu.show {
    display: block;
}

.filter-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.filter-option.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.filter-option.active:hover {
    background: var(--primary-dark);
}

/* Responsive Filter Dropdowns */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-dropdown {
        width: 100%;
    }
    
    .filter-btn {
        width: 100%;
        min-width: unset;
    }
    
    .filter-dropdown-menu {
        width: 100%;
        max-height: 250px;
    }
    
    .clear-filters-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 0.75rem 1rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .filter-option {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

.clear-filters-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--text-light);
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.results-info span {
    font-weight: 600;
    color: var(--text-primary);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* List View */
.movies-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.movies-container.list-view .movie-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.movies-container.list-view .movie-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.movies-container.list-view .movie-poster {
    width: 120px;
    aspect-ratio: 2/3; /* Фиксированное соотношение сторон */
    margin-right: 1.5rem;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    padding: 3px; /* Уменьшенный отступ для списка */
    box-sizing: border-box;
}

/* Fallback для браузеров без поддержки aspect-ratio в списке */
@supports not (aspect-ratio: 2/3) {
    .movies-container.list-view .movie-poster {
        height: 180px; /* 120px * 1.5 = 180px для соотношения 2:3 */
    }
    
    .movies-container.list-view .movie-poster img {
        position: absolute;
        top: 3px;
        left: 3px;
        right: 3px;
        bottom: 3px;
        width: calc(100% - 6px);
        height: calc(100% - 6px);
    }
}

.movies-container.list-view .movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Полное заполнение с сохранением пропорций */
    object-position: center top; /* Показываем верхнюю часть для названий */
    border-radius: 4px; /* Скругленные углы для изображения */
}

.movies-container.list-view .movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px; /* Минимальная высота для соответствия aspect-ratio 2/3 */
}

.movies-container.list-view .movie-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.movies-container.list-view .movie-meta {
    margin-bottom: 1rem;
}

.movies-container.list-view .movie-price {
    margin-bottom: 1rem;
}

.movies-container.list-view .add-to-cart {
    align-self: flex-start;
}

.movies-container.movie-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.movie-card-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.movie-card-list:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.movie-card-list .movie-poster-small {
    width: 120px;
    height: 180px;
    flex-shrink: 0;
}

.movie-card-list .movie-info {
    flex: 1;
    padding: 0;
}

.movie-card-list .movie-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.movie-card-list .movie-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.movie-card-list .movie-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.movie-card-list .movie-price {
    font-size: 1.2rem;
    font-weight: 700;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 600;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* Cart Styles */
.cart-section {
    padding: 2rem 0 4rem;
    min-height: 80vh;
}

.cart-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cart-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.cart-items-list {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-poster {
    width: 100px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cart-item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-dark);
}

.quantity {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-item-actions {
    display: flex;
    gap: 0.5rem;
}

.remove-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: #dc2626;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.summary-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.summary-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.promo-code {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.promo-code h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.promo-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.promo-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.promo-message {
    font-size: 0.9rem;
    font-weight: 600;
}

.promo-message .success {
    color: var(--success-color, #10b981);
}

.promo-message .error {
    color: var(--accent-color);
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-cart-icon {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-cart h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
}

.modal-body {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.checkout-items {
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-totals {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.checkout-total-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.confirmation-content {
    text-align: center;
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--success-color, #10b981);
    margin-bottom: 1rem;
}

.confirmation-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.order-details {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.confirmation-actions {
    margin-top: 2rem;
}

/* Responsive Cart */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .cart-item-quantity,
    .cart-item-total,
    .cart-item-actions {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 1rem;
    }
    
    .cart-item-quantity {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cart-section {
        padding: 1rem 0 2rem;
    }
    
    .cart-header h1 {
        font-size: 2rem;
    }
    
    .cart-item {
        grid-template-columns: 60px 1fr;
    }
    
    .cart-item-poster {
        width: 60px;
        height: 90px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Movie Details Page Styles */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 1rem 0;
    margin-top: 60px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

.movie-details-section {
    padding: 3rem 0;
}

.movie-details {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    align-items: start;
}

.movie-poster-large {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.movie-poster-large img {
    width: 100%;
    height: auto;
    display: block;
}

.movie-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sale-badge,
.new-badge,
.featured-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sale-badge {
    background: var(--accent-color);
    color: white;
}

.new-badge {
    background: var(--success-color, #10b981);
    color: white;
}

.featured-badge {
    background: var(--secondary-color);
    color: white;
}

.movie-info {
    padding: 1rem 0;
}

.movie-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.movie-price-section {
    margin-bottom: 2rem;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.original-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: var(--text-light);
}

.savings {
    color: var(--success-color, #10b981);
    font-weight: 600;
    font-size: 1.1rem;
}

.movie-description {
    margin-bottom: 2rem;
}

.movie-description h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.movie-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.1rem;
}

.movie-details-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value {
    color: var(--text-secondary);
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.movie-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.movie-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature i {
    color: var(--success-color, #10b981);
    font-size: 1.1rem;
}

/* Trailer Section */
.trailer-section {
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem 0;
    position: relative;
}

.trailer-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.close-trailer {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    color: black;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

.trailer-video {
    border-radius: 10px;
    overflow: hidden;
}

/* Related Movies Section */
.related-movies-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

/* Reviews Section */
.reviews-section {
    padding: 3rem 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.review-header {
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.reviewer-details h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.review-rating {
    color: var(--secondary-color);
}

.review-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

/* Movie Not Found */
.movie-not-found {
    padding: 4rem 0;
    text-align: center;
}

.movie-not-found h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.movie-not-found p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Responsive Movie Details */
@media (max-width: 768px) {
    .movie-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .movie-poster-large {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .movie-title {
        font-size: 2rem;
    }
    
    .movie-meta {
        gap: 1rem;
    }
    
    .movie-actions {
        flex-direction: column;
    }
    
    .movie-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .movie-details-section {
        padding: 2rem 0;
    }
    
    .movie-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .movie-actions {
        gap: 0.5rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive Catalog */
@media (max-width: 768px) {
    .catalog-title {
        font-size: 2rem;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-info {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .movie-card-list {
        flex-direction: column;
        text-align: center;
    }
    
    .movie-card-list .movie-poster-small {
        width: 100px;
        height: 150px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .catalog-section {
        padding: 1rem 0 2rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* Секция трейлера в стиле Epic Media */
.movie-trailer-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.trailer-section-header {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.trailer-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trailer-section-title i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.trailer-section-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 0 1rem 1rem 1rem;
}

.trailer-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.trailer-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.trailer-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 12px;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.loading-spinner i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.trailer-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 12px;
}

.trailer-fallback-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-tertiary);
}

.trailer-fallback-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.trailer-fallback-text {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
}

/* Responsive для трейлеров */
@media (max-width: 768px) {
    .movie-trailer-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .trailer-section-header {
        margin-bottom: 1rem;
        padding: 0 0.75rem;
    }
    
    .trailer-section-title {
        font-size: 1.1rem;
    }
    
    .trailer-section-title i {
        font-size: 1.2rem;
    }
    
    .trailer-section-content {
        margin: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .trailer-loading-state,
    .trailer-fallback {
        padding: 2rem 1.5rem;
    }
    
    .loading-spinner i {
        font-size: 2rem;
    }
    
    .loading-text {
        font-size: 1rem;
    }
    
    .trailer-fallback-icon {
        font-size: 3rem;
    }
    
    .trailer-fallback-title {
        font-size: 1.2rem;
    }
    
    .trailer-fallback-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .movie-trailer-section {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .trailer-section-header {
        margin-bottom: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .trailer-section-title {
        font-size: 1rem;
    }
    
    .trailer-section-title i {
        font-size: 1.1rem;
    }
    
    .trailer-section-content {
        margin: 0 0.5rem 0.5rem 0.5rem;
    }
    
    .trailer-loading-state,
    .trailer-fallback {
        padding: 1.5rem 1rem;
    }
    
    .loading-spinner i {
        font-size: 1.75rem;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
    
    .trailer-fallback-icon {
        font-size: 2.5rem;
    }
    
    .trailer-fallback-title {
        font-size: 1.1rem;
    }
    
    .trailer-fallback-text {
        font-size: 0.85rem;
    }
}

/* Темная тема для трейлеров */
[data-theme="dark"] .movie-trailer-section {
    background: var(--bg-card);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .trailer-section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .trailer-section-title i {
    color: var(--primary-color);
}

[data-theme="dark"] .trailer-section-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .trailer-loading-state {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

[data-theme="dark"] .loading-spinner i {
    color: var(--primary-color);
}

[data-theme="dark"] .loading-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .trailer-fallback {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

[data-theme="dark"] .trailer-fallback-icon {
    color: var(--text-tertiary);
}

[data-theme="dark"] .trailer-fallback-title {
    color: var(--text-primary);
}

/* Movie Poster Styles */
.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.movie-poster {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 300px;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

/* Placeholder Poster Styles */
.placeholder-poster {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 300px;
}

.movie-card:hover .placeholder-poster {
    transform: scale(1.05);
}

.placeholder-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.movie-card:hover .placeholder-poster::before {
    transform: translateX(100%);
}

/* Hero Section Responsive Styles */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
        min-height: 60vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .movie-poster {
        max-width: 250px;
    }
}

/* Catalog Stats Styles */
.catalog-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.catalog-stats span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.catalog-stats #total-movies {
    font-weight: 600;
    color: var(--text-primary);
}

.catalog-stats #current-page {
    font-weight: 500;
    color: var(--primary-color);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
    font-weight: bold;
}

@media (max-width: 768px) {
    .pagination {
        gap: 4px;
    }
    
    .pagination-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
        min-width: 32px;
    }
    
    /* Hero Section Mobile Styles */
    .hero .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .hero .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    .hero .btn-primary,
    .hero .btn-secondary {
        width: 100% !important;
        max-width: 280px !important;
    }
}

@media (max-width: 480px) {
    .hero .hero-title {
        font-size: 2rem !important;
    }
    
    .hero .hero-subtitle {
        font-size: 1rem !important;
    }
}

/* Hero Section Styles */
.hero .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

.hero .btn-secondary:hover {
    background: white !important;
    color: #667eea !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav {
        position: relative;
    }
    
    .nav-list {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        background: var(--bg-primary) !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 80px !important;
        transition: left 0.3s ease !important;
        z-index: 1001 !important;
        border-top: none !important;
        box-shadow: var(--shadow-xl) !important;
        overflow-y: auto !important;
        display: flex !important;
        list-style: none !important;
        gap: 0 !important;
        margin: 0 !important;
        padding-left: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-list.active {
        left: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-list li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .nav-link:hover {
        background: var(--bg-secondary);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1.5rem 0;
        min-height: 50vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .movie-poster {
        max-width: 200px;
    }
    
    .play-overlay {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Movie Details Placeholder */
.movie-details .placeholder-poster {
    min-height: 500px;
    border-radius: 12px;
}

.movie-details .placeholder-poster div:first-child {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.movie-details .placeholder-poster div:nth-child(2) {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.movie-details .placeholder-poster div:nth-child(3) {
    font-size: 1.2rem;
}

/* Movie Catalog Styles */
.catalog-section {
    padding: 3rem 0;
    background: var(--bg-secondary);
    min-height: 80vh;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.results-info {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.movie-poster {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.movie-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.movie-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
}

.movie-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.movie-year {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.movie-genre {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.movie-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.sale-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.add-to-cart i {
    font-size: 0.9rem;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design for Movie Cards */
@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.75rem;
    }
    
    /* aspect-ratio автоматически адаптируется к ширине карточки */
}

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .movie-info {
        padding: 1.25rem;
    }
    
    .movie-title {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .movie-info {
        padding: 1rem;
    }
    
    .movie-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
        min-height: 2.6em;
    }
    
    .movie-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .movie-year,
    .movie-genre {
        font-size: 0.8rem;
    }
    
    .price,
    .sale-price {
        font-size: 1.2rem;
    }
    
    .original-price {
        font-size: 0.85rem;
    }
    
    .add-to-cart {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
    
    .movie-info {
        padding: 0.75rem;
    }
    
    .movie-title {
        font-size: 0.9rem;
    }
    
    .movie-meta {
        font-size: 0.75rem;
    }
    
    .price,
    .sale-price {
        font-size: 1.1rem;
    }
    
    .add-to-cart {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Comprehensive Mobile Responsive Design */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
        white-space: nowrap;
    }
    
    .nav-list {
        gap: 1.5rem;
    }
    
    .search-input {
        width: 50px;
    }
    
    .search-input:focus {
        width: 250px;
    }
    
    .search-input:not(:placeholder-shown) {
        width: 250px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    /* Header Mobile */
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.5rem 0;
    }
    
    .logo h1 {
        font-size: 1.3rem;
        white-space: nowrap;
    }
    
    /* Mobile Menu Toggle - стили уже определены выше в @media (max-width: 768px) */
    
    .header-actions {
        gap: 0.75rem;
    }
    
    .search-input {
        width: 45px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .search-input:focus {
        width: 200px;
    }
    
    .search-input:not(:placeholder-shown) {
        width: 200px;
    }
    
    .search-btn {
        width: 32px;
        height: 32px;
        right: 6px;
    }
    
    .cart-btn, .user-btn, .admin-link {
        padding: 0.5rem;
    }
    
    /* Movie Grid */
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
    
    .movie-poster {
        height: 350px;
    }
    
    .movie-info {
        padding: 1.25rem;
    }
    
    .movie-title {
        font-size: 1.1rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    /* Filters */
    .filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    /* Header Mobile Portrait */
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .logo h1 {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .search-input {
        width: 60px;
        max-width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-input:focus {
        width: 100%;
        max-width: 300px;
    }
    
    .search-input:not(:placeholder-shown) {
        width: 100%;
        max-width: 300px;
    }
    
    .search-btn {
        width: 36px;
        height: 36px;
        right: 8px;
    }
    
    /* Movie Grid Mobile */
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .movie-poster {
        height: 300px;
    }
    
    .movie-info {
        padding: 1rem;
    }
    
    .movie-title {
        font-size: 1rem;
        -webkit-line-clamp: 3;
        min-height: 3.9em;
    }
    
    .movie-meta {
        gap: 0.5rem;
    }
    
    .movie-year,
    .movie-genre {
        font-size: 0.8rem;
    }
    
    .price,
    .sale-price {
        font-size: 1.25rem;
    }
    
    .original-price {
        font-size: 0.9rem;
    }
    
    .add-to-cart {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Filters Mobile */
    .filters {
        padding: 1rem 0;
    }
    
    .filter-group {
        margin-bottom: 0.75rem;
    }
    
    .filter-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .filter-group select,
    .filter-group input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .pagination button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-width: 40px;
    }
    
    /* Results Count Mobile */
    .results-count {
        text-align: center;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* View Toggle Mobile */
    .view-toggle {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .view-toggle button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .container {
        padding: 0 5px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.75rem;
    }
    
    .movie-poster {
        height: 280px;
    }
    
    .movie-info {
        padding: 0.75rem;
    }
    
    .movie-title {
        font-size: 0.9rem;
    }
    
    .movie-year,
    .movie-genre {
        font-size: 0.75rem;
    }
    
    .price,
    .sale-price {
        font-size: 1.1rem;
    }
    
    .add-to-cart {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .movie-card:hover {
        transform: none;
    }
    
    .movie-card:active {
        transform: scale(0.98);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .add-to-cart:hover {
        transform: none;
    }
    
    .add-to-cart:active {
        transform: scale(0.98);
    }
    
    /* Увеличиваем размеры для касания */
    .search-btn,
    .cart-btn,
    .user-btn,
    .admin-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    .pagination button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .movie-poster img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-card: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --border-color: #374151;
    }
    
    .header {
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
    }
    
    .movie-card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
    }
}

/* Movie Cards Styles */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3; /* Фиксированное соотношение сторон как у постеров фильмов */
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0; /* Скругленные углы только сверху */
    padding: 4px; /* Уменьшенный отступ для лучшего заполнения */
    box-sizing: border-box;
}

/* Fallback для браузеров без поддержки aspect-ratio */
@supports not (aspect-ratio: 2/3) {
    .movie-poster {
        height: 0;
        padding-bottom: 150%; /* 2/3 = 150% для создания соотношения 2:3 */
    }
    
    .movie-poster img {
        position: absolute;
        top: 4px;
        left: 4px;
        right: 4px;
        bottom: 4px;
        width: calc(100% - 8px);
        height: calc(100% - 8px);
    }
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Полное заполнение с сохранением пропорций */
    object-position: center top; /* Показываем верхнюю часть для названий */
    transition: transform 0.3s ease;
    border-radius: 6px; /* Скругленные углы для изображения */
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.movie-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.sale-badge,
.new-badge,
.featured-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sale-badge {
    background: var(--accent-color);
    color: white;
}

.new-badge {
    background: var(--success-color, #10b981);
    color: white;
}

.featured-badge {
    background: var(--secondary-color);
    color: white;
}

.movie-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.movie-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em; /* Резервируем место для 2 строк */
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.movie-year,
.movie-genre {
    font-weight: 500;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.movie-rating i {
    color: var(--secondary-color);
}

.movie-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
}

.price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.sale-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-color);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
}

.add-to-cart {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.add-to-cart i {
    font-size: 0.9rem;
}

/* Featured Movies Section */
.featured-movies {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: var(--primary-dark);
}

.view-all i {
    transition: transform 0.3s ease;
}

.view-all:hover i {
    transform: translateX(5px);
}

/* New Releases Section */
.new-releases-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin: 4rem 0;
}

/* Support Chat Widget */
.support-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chat-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.chat-toggle.active {
    background: var(--accent-color);
    transform: scale(0.95);
}

.chat-toggle .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-widget.open {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-primary);
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.support {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-message.system {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    align-self: center;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.chat-input-container {
    padding: 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-send:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.quick-questions {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-question {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-question:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Mobile Responsive for Chat */
@media (max-width: 768px) {
    .support-chat {
        bottom: 15px;
        right: 15px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .chat-widget {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 15px;
        left: 15px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .support-chat {
        bottom: 10px;
        right: 10px;
    }
    
    .chat-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 60px;
        right: 10px;
        left: 10px;
    }
    
    .chat-message {
        max-width: 90%;
        font-size: 0.85rem;
    }
    
    .quick-questions {
        padding: 0.5rem;
    }
    
    .quick-question {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-dark: #030712;
    --bg-card: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Dark Theme Specific Styles */
[data-theme="dark"] .header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: var(--primary-color);
}

[data-theme="dark"] .search-input {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .search-input:focus {
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .search-input::placeholder {
    color: #9ca3af;
}

[data-theme="dark"] .cart-btn,
[data-theme="dark"] .user-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .cart-btn:hover,
[data-theme="dark"] .user-btn:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .hero-title {
    color: var(--text-primary);
}

[data-theme="dark"] .hero-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .movie-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .movie-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

[data-theme="dark"] .movie-poster-small {
    background: var(--bg-secondary);
}

[data-theme="dark"] .movie-poster-small img {
    border-radius: 8px;
}

[data-theme="dark"] .movie-info {
    background: var(--bg-card);
}

[data-theme="dark"] .movie-meta {
    color: var(--text-secondary);
}

[data-theme="dark"] .movie-price {
    color: var(--text-primary);
}

[data-theme="dark"] .sale-price {
    color: var(--primary-color);
}

[data-theme="dark"] .original-price {
    color: #9ca3af;
}

[data-theme="dark"] .movie-badges {
    background: transparent;
}

[data-theme="dark"] .sale-badge {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .new-badge {
    background: var(--success-color, #10b981);
    color: white;
}

[data-theme="dark"] .trailer-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .trailer-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .movie-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .movie-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .movie-overlay .play-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

[data-theme="dark"] .movie-overlay .play-btn:hover {
    background: rgba(255, 255, 255, 1);
}

[data-theme="dark"] .play-icon {
    color: white;
}

[data-theme="dark"] .add-to-cart {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

[data-theme="dark"] .add-to-cart:hover {
    background: var(--primary-color-dark, #2563eb);
    border-color: var(--primary-color-dark, #2563eb);
}

[data-theme="dark"] .add-to-cart i {
    color: white;
}

[data-theme="dark"] .movie-title {
    color: var(--text-primary);
}

[data-theme="dark"] .movie-year {
    color: var(--text-secondary);
}

[data-theme="dark"] .movie-genre {
    color: var(--text-light);
}

[data-theme="dark"] .price {
    color: var(--primary-color);
}

[data-theme="dark"] .price-old {
    color: #9ca3af;
}

[data-theme="dark"] .btn {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .btn:hover {
    background: var(--primary-dark);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .footer-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .footer-link {
    color: #9ca3af;
}

[data-theme="dark"] .footer-link:hover {
    color: var(--primary-color);
}

/* Trailer Modal Dark Theme */
[data-theme="dark"] .trailer-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .trailer-modal-title {
    color: var(--text-primary);
}

[data-theme="dark"] .trailer-modal-close {
    color: var(--text-secondary);
}

[data-theme="dark"] .trailer-modal-close:hover {
    color: var(--text-primary);
}

[data-theme="dark"] .trailer-fallback-title {
    color: var(--text-primary);
}

[data-theme="dark"] .trailer-fallback-text {
    color: var(--text-secondary);
}

/* Admin Panel Dark Theme */
[data-theme="dark"] .admin-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-header h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-nav-link:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .admin-logout {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-logout:hover {
    color: var(--accent-color);
}

[data-theme="dark"] .admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-menu-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-menu-item:hover,
[data-theme="dark"] .admin-menu-item.active {
    color: var(--primary-color);
    background: var(--bg-primary);
}

[data-theme="dark"] .admin-main {
    background: var(--bg-primary);
}

[data-theme="dark"] .admin-section-header h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-table td {
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .form-control::placeholder {
    color: #9ca3af;
}

/* Dark Theme - Pagination */
[data-theme="dark"] .pagination {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .pagination-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .pagination-btn:disabled {
    background: var(--bg-dark);
    color: #9ca3af;
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination-ellipsis {
    color: var(--text-secondary);
}

/* Dark Theme - Catalog Elements */
[data-theme="dark"] .catalog-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .catalog-title {
    color: var(--text-primary);
}

[data-theme="dark"] .catalog-subtitle {
    color: var(--text-secondary);
}

[data-theme="dark"] .filter-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .filter-title {
    color: var(--text-primary);
}

[data-theme="dark"] .filter-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .view-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .view-toggle button {
    color: var(--text-primary);
}

[data-theme="dark"] .view-toggle button.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .movies-container {
    background: var(--bg-primary);
}

[data-theme="dark"] .movies-container.list-view .movie-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .movies-container.list-view .movie-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

[data-theme="dark"] .movie-card-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .movie-card-list:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

[data-theme="dark"] .movie-card-list .movie-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .movie-card-list .movie-price {
    color: var(--text-primary);
}

[data-theme="dark"] .no-results {
    color: var(--text-secondary);
}

[data-theme="dark"] .loading-spinner {
    border-color: var(--border-color);
    border-top-color: var(--primary-color);
}

/* Dark Theme - Search and Sort */
[data-theme="dark"] .search-sort-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .sort-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .sort-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Mobile Responsive Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin: 0 0.25rem;
    }
    
    /* Ensure theme toggle is visible on mobile */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin: 0 0.2rem;
    }
    
    /* Compact header actions for small screens */
    .header-actions {
        gap: 0.25rem;
    }
    
    .header-actions .search-box {
        order: 1;
    }
    
    .header-actions .theme-toggle {
        order: 2;
    }
    
    .header-actions .cart-btn,
    .header-actions .user-btn {
        order: 3;
    }
}

/* Touch-friendly theme toggle */
@media (hover: none) and (pointer: coarse) {
    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }
    
    .theme-toggle:active {
        transform: scale(0.9);
        background-color: var(--bg-secondary);
    }
}

/* Dark theme mobile adjustments */
[data-theme="dark"] @media (max-width: 768px) {
    .header-actions {
        background: transparent;
    }
    
    .theme-toggle {
        background: var(--bg-secondary);
    }
    
    .theme-toggle:hover {
        background: var(--bg-primary);
    }
}

/* User Menu Dropdown Styling */
.user-menu {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-btn:hover {
    background: var(--hover-background);
}

.user-btn i {
    font-size: 1.2rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
}

.user-dropdown a:hover {
    background: var(--hover-background);
    color: var(--primary-color);
}

.user-dropdown a i {
    width: 18px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.user-dropdown a:hover i {
    color: var(--primary-color);
}

.user-dropdown hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.user-dropdown a:last-child {
    color: var(--error-color) !important;
}

.user-dropdown a:last-child:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--error-color) !important;
}

/* Mobile adjustments for user dropdown */
@media (max-width: 768px) {
    .user-dropdown {
        right: -10px;
        min-width: 160px;
    }
}

/* Dark theme user dropdown */
[data-theme="dark"] .user-dropdown {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Tablet responsive adjustments */
@media (max-width: 1024px) {
    .nav-list {
        gap: 1.2rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .search-input:focus,
    .search-input:not(:placeholder-shown) {
        width: 220px;
    }
}

/* Small laptop screens */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 0 15px;
    }
    
    .nav-list {
        gap: 1.3rem;

 
 / *   = = = = = = = = = = = = =   ,+  !  ( "+)   = = = = = = = = = = = = =   * / 
 
 . g l o b a l - s e a r c h - r e s u l t s   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   1 0 0 % ; 
         l e f t :   0 ; 
         r i g h t :   0 ; 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - r a d i u s :   8 p x ; 
         b o x - s h a d o w :   0   1 0 p x   2 5 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
         z - i n d e x :   1 0 0 0 ; 
         m a x - h e i g h t :   2 8 0 p x ; 
         o v e r f l o w - y :   a u t o ; 
         m a r g i n - t o p :   4 p x ; 
         w i d t h :   1 0 0 % ; 
         m i n - w i d t h :   3 0 0 p x ; 
         m a x - w i d t h :   4 0 0 p x ; 
 } 
 
 . s e a r c h - r e s u l t s - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   8 p x   1 2 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b a c k g r o u n d :   # f 8 f a f c ; 
         f o n t - s i z e :   1 2 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         p o s i t i o n :   s t i c k y ; 
         t o p :   0 ; 
         z - i n d e x :   1 0 ; 
 } 
 
 . s e a r c h - v i e w - a l l   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - c o l o r ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
         p a d d i n g :   4 p x   8 p x ; 
         b o r d e r - r a d i u s :   4 p x ; 
         f o n t - s i z e :   1 1 p x ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 

 
 / *   = = = = = = = = = = = = =   ,+  !  ( ! +)   = = = = = = = = = = = = =   * / 
 
 . g l o b a l - s e a r c h - r e s u l t s   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   1 0 0 % ; 
         l e f t :   0 ; 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - r a d i u s :   8 p x ; 
         b o x - s h a d o w :   0   1 0 p x   2 5 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
         z - i n d e x :   1 0 0 0 ; 
         m a x - h e i g h t :   2 0 0 p x ; 
         o v e r f l o w - y :   a u t o ; 
         m a r g i n - t o p :   4 p x ; 
         w i d t h :   3 2 0 p x ; 
         m i n - w i d t h :   2 8 0 p x ; 
         m a x - w i d t h :   3 5 0 p x ; 
 } 
 
 . s e a r c h - r e s u l t s - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   6 p x   1 0 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b a c k g r o u n d :   # f 8 f a f c ; 
         f o n t - s i z e :   1 1 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         p o s i t i o n :   s t i c k y ; 
         t o p :   0 ; 
         z - i n d e x :   1 0 ; 
 } 
 
 . s e a r c h - v i e w - a l l   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - c o l o r ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
         p a d d i n g :   3 p x   6 p x ; 
         b o r d e r - r a d i u s :   4 p x ; 
         f o n t - s i z e :   1 0 p x ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - v i e w - a l l : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - d a r k ) ; 
 } 
 
 . s e a r c h - r e s u l t s - l i s t   { 
         m a x - h e i g h t :   1 6 0 p x ; 
         o v e r f l o w - y :   a u t o ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   6 p x   1 0 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : h o v e r   { 
         b a c k g r o u n d :   # f 8 f a f c ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : l a s t - c h i l d   { 
         b o r d e r - b o t t o m :   n o n e ; 
 } 
 
 . s e a r c h - r e s u l t - p o s t e r   { 
         w i d t h :   2 8 p x ; 
         h e i g h t :   4 2 p x ; 
         o b j e c t - f i t :   c o v e r ; 
         b o r d e r - r a d i u s :   4 p x ; 
         m a r g i n - r i g h t :   8 p x ; 
         f l e x - s h r i n k :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - i n f o   { 
         f l e x :   1 ; 
         m i n - w i d t h :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - t i t l e   { 
         f o n t - s i z e :   1 2 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 1 e 2 9 3 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         w h i t e - s p a c e :   n o w r a p ; 
         o v e r f l o w :   h i d d e n ; 
         t e x t - o v e r f l o w :   e l l i p s i s ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - m e t a   { 
         f o n t - s i z e :   1 0 p x ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - p r i c e   { 
         f o n t - s i z e :   1 1 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
         m a r g i n :   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   { 
         p a d d i n g :   1 2 p x   1 0 p x ; 
         t e x t - a l i g n :   c e n t e r ; 
         c o l o r :   # 6 4 7 4 8 b ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   i   { 
         f o n t - s i z e :   1 6 p x ; 
         m a r g i n - b o t t o m :   4 p x ; 
         c o l o r :   # c b d 5 e 1 ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   p   { 
         m a r g i n :   0   0   2 p x   0 ; 
         f o n t - w e i g h t :   5 0 0 ; 
         f o n t - s i z e :   1 2 p x ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   s m a l l   { 
         f o n t - s i z e :   1 0 p x ; 
 } 
 
 / *   40?B82=>ABL  4;O  3;>10;L=>3>  ?>8A:0  * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . g l o b a l - s e a r c h - r e s u l t s   { 
                 l e f t :   5 p x ; 
                 m a x - h e i g h t :   1 8 0 p x ; 
                 m i n - w i d t h :   2 6 0 p x ; 
                 m a x - w i d t h :   c a l c ( 1 0 0 v w   -   2 0 p x ) ; 
         } 
         
         . s e a r c h - r e s u l t - i t e m   { 
                 p a d d i n g :   5 p x   8 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p o s t e r   { 
                 w i d t h :   2 4 p x ; 
                 h e i g h t :   3 6 p x ; 
         } 
         
         . s e a r c h - r e s u l t - t i t l e   { 
                 f o n t - s i z e :   1 1 p x ; 
         } 
         
         . s e a r c h - r e s u l t - m e t a   { 
                 f o n t - s i z e :   9 p x ; 
         } 

 
 / *   = = = = = = = = = = = = =   "+  ,+  !  = = = = = = = = = = = = =   * / 
 
 . g l o b a l - s e a r c h - r e s u l t s   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   1 0 0 % ; 
         l e f t :   0 ; 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - r a d i u s :   8 p x ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
         z - i n d e x :   1 0 0 0 ; 
         w i d t h :   3 0 0 p x ; 
         m a x - h e i g h t :   1 8 0 p x ; 
         o v e r f l o w :   h i d d e n ; 
         m a r g i n - t o p :   2 p x ; 
 } 
 
 . s e a r c h - r e s u l t s - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   4 p x   8 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b a c k g r o u n d :   # f 8 f a f c ; 
         f o n t - s i z e :   1 0 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         c o l o r :   # 6 4 7 4 8 b ; 
 } 
 
 . s e a r c h - v i e w - a l l   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - c o l o r ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
         p a d d i n g :   2 p x   6 p x ; 
         b o r d e r - r a d i u s :   3 p x ; 
         f o n t - s i z e :   9 p x ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - v i e w - a l l : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - d a r k ) ; 
 } 
 
 . s e a r c h - r e s u l t s - l i s t   { 
         m a x - h e i g h t :   1 4 0 p x ; 
         o v e r f l o w - y :   a u t o ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   4 p x   8 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : h o v e r   { 
         b a c k g r o u n d :   # f 8 f a f c ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : l a s t - c h i l d   { 
         b o r d e r - b o t t o m :   n o n e ; 
 } 
 
 . s e a r c h - r e s u l t - p o s t e r   { 
         w i d t h :   2 4 p x ; 
         h e i g h t :   3 6 p x ; 
         o b j e c t - f i t :   c o v e r ; 
         b o r d e r - r a d i u s :   3 p x ; 
         m a r g i n - r i g h t :   6 p x ; 
         f l e x - s h r i n k :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - i n f o   { 
         f l e x :   1 ; 
         m i n - w i d t h :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - t i t l e   { 
         f o n t - s i z e :   1 1 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 1 e 2 9 3 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         w h i t e - s p a c e :   n o w r a p ; 
         o v e r f l o w :   h i d d e n ; 
         t e x t - o v e r f l o w :   e l l i p s i s ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - m e t a   { 
         f o n t - s i z e :   9 p x ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - p r i c e   { 
         f o n t - s i z e :   1 0 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
         m a r g i n :   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   { 
         p a d d i n g :   8 p x ; 
         t e x t - a l i g n :   c e n t e r ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         f o n t - s i z e :   1 1 p x ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   i   { 
         f o n t - s i z e :   1 4 p x ; 
         m a r g i n - b o t t o m :   2 p x ; 
         c o l o r :   # c b d 5 e 1 ; 
 } 
 
 / *   40?B82=>ABL  4;O  :><?0:B=>3>  ?>8A:0  * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . g l o b a l - s e a r c h - r e s u l t s   { 
                 w i d t h :   2 8 0 p x ; 
                 m a x - h e i g h t :   1 6 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t s - l i s t   { 
                 m a x - h e i g h t :   1 2 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - i t e m   { 
                 p a d d i n g :   3 p x   6 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p o s t e r   { 
                 w i d t h :   2 0 p x ; 
                 h e i g h t :   3 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - t i t l e   { 
                 f o n t - s i z e :   1 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - m e t a   { 
                 f o n t - s i z e :   8 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p r i c e   { 
                 f o n t - s i z e :   9 p x ; 
         } 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   4 8 0 p x )   { 
         . g l o b a l - s e a r c h - r e s u l t s   { 
                 w i d t h :   2 6 0 p x ; 
                 m a x - h e i g h t :   1 4 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t s - l i s t   { 
                 m a x - h e i g h t :   1 0 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - i t e m   { 
                 p a d d i n g :   2 p x   4 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p o s t e r   { 
                 w i d t h :   1 8 p x ; 
                 h e i g h t :   2 7 p x ; 
         } 
         
         . s e a r c h - r e s u l t - t i t l e   { 
                 f o n t - s i z e :   9 p x ; 
         } 
         
         . s e a r c h - r e s u l t - m e t a   { 
                 f o n t - s i z e :   7 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p r i c e   { 
                 f o n t - s i z e :   8 p x ; 
         } 
 } 
 
 / *   "5<=0O  B5<0  4;O  :><?0:B=>3>  ?>8A:0  * / 
 [ d a t a - t h e m e = \ 
 
 d a r k \ ]   . g l o b a l - s e a r c h - r e s u l t s   { 
         b a c k g r o u n d :   v a r ( - - a d m i n - l i g h t ) ; 
         b o r d e r - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t s - h e a d e r   { 
         b a c k g r o u n d :   v a r ( - - a d m i n - l i g h t ) ; 
         b o r d e r - b o t t o m - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - i t e m   { 
         b o r d e r - b o t t o m - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - i t e m : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - t i t l e   { 
         c o l o r :   v a r ( - - a d m i n - d a r k ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - m e t a   { 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - n o - r e s u l t s   { 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - n o - r e s u l t s   i   { 
         c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 / *   >78F8>=8@>20=85  ?>8A:>2>9  :>@>1:8  * / 
 . h e a d e r - a c t i o n s   { 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 
 . s e a r c h - b o x   { 
         p o s i t i o n :   r e l a t i v e ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
 } 
 
 
 
 / *   = = = = = = = = = = = = =   "+  ,+  !  = = = = = = = = = = = = =   * / 
 
 . g l o b a l - s e a r c h - r e s u l t s   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   1 0 0 % ; 
         l e f t :   0 ; 
         b a c k g r o u n d :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - r a d i u s :   8 p x ; 
         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 5 ) ; 
         z - i n d e x :   1 0 0 0 ; 
         w i d t h :   3 0 0 p x ; 
         m a x - h e i g h t :   1 8 0 p x ; 
         o v e r f l o w :   h i d d e n ; 
         m a r g i n - t o p :   2 p x ; 
 } 
 
 . s e a r c h - r e s u l t s - h e a d e r   { 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   4 p x   8 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b a c k g r o u n d :   # f 8 f a f c ; 
         f o n t - s i z e :   1 0 p x ; 
         f o n t - w e i g h t :   5 0 0 ; 
         c o l o r :   # 6 4 7 4 8 b ; 
 } 
 
 . s e a r c h - v i e w - a l l   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - c o l o r ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   n o n e ; 
         p a d d i n g :   2 p x   6 p x ; 
         b o r d e r - r a d i u s :   3 p x ; 
         f o n t - s i z e :   9 p x ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - v i e w - a l l : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y - d a r k ) ; 
 } 
 
 . s e a r c h - r e s u l t s - l i s t   { 
         m a x - h e i g h t :   1 4 0 p x ; 
         o v e r f l o w - y :   a u t o ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         p a d d i n g :   4 p x   8 p x ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # f 1 f 5 f 9 ; 
         c u r s o r :   p o i n t e r ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s   e a s e ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : h o v e r   { 
         b a c k g r o u n d :   # f 8 f a f c ; 
 } 
 
 . s e a r c h - r e s u l t - i t e m : l a s t - c h i l d   { 
         b o r d e r - b o t t o m :   n o n e ; 
 } 
 
 . s e a r c h - r e s u l t - p o s t e r   { 
         w i d t h :   2 4 p x ; 
         h e i g h t :   3 6 p x ; 
         o b j e c t - f i t :   c o v e r ; 
         b o r d e r - r a d i u s :   3 p x ; 
         m a r g i n - r i g h t :   6 p x ; 
         f l e x - s h r i n k :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - i n f o   { 
         f l e x :   1 ; 
         m i n - w i d t h :   0 ; 
 } 
 
 . s e a r c h - r e s u l t - t i t l e   { 
         f o n t - s i z e :   1 1 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   # 1 e 2 9 3 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         w h i t e - s p a c e :   n o w r a p ; 
         o v e r f l o w :   h i d d e n ; 
         t e x t - o v e r f l o w :   e l l i p s i s ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - m e t a   { 
         f o n t - s i z e :   9 p x ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         m a r g i n :   0   0   1 p x   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - r e s u l t - p r i c e   { 
         f o n t - s i z e :   1 0 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ; 
         m a r g i n :   0 ; 
         l i n e - h e i g h t :   1 . 2 ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   { 
         p a d d i n g :   8 p x ; 
         t e x t - a l i g n :   c e n t e r ; 
         c o l o r :   # 6 4 7 4 8 b ; 
         f o n t - s i z e :   1 1 p x ; 
 } 
 
 . s e a r c h - n o - r e s u l t s   i   { 
         f o n t - s i z e :   1 4 p x ; 
         m a r g i n - b o t t o m :   2 p x ; 
         c o l o r :   # c b d 5 e 1 ; 
 } 
 
 / *   40?B82=>ABL  4;O  :><?0:B=>3>  ?>8A:0  * / 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . g l o b a l - s e a r c h - r e s u l t s   { 
                 w i d t h :   2 8 0 p x ; 
                 m a x - h e i g h t :   1 6 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t s - l i s t   { 
                 m a x - h e i g h t :   1 2 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - i t e m   { 
                 p a d d i n g :   3 p x   6 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p o s t e r   { 
                 w i d t h :   2 0 p x ; 
                 h e i g h t :   3 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - t i t l e   { 
                 f o n t - s i z e :   1 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - m e t a   { 
                 f o n t - s i z e :   8 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p r i c e   { 
                 f o n t - s i z e :   9 p x ; 
         } 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   4 8 0 p x )   { 
         . g l o b a l - s e a r c h - r e s u l t s   { 
                 w i d t h :   2 6 0 p x ; 
                 m a x - h e i g h t :   1 4 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t s - l i s t   { 
                 m a x - h e i g h t :   1 0 0 p x ; 
         } 
         
         . s e a r c h - r e s u l t - i t e m   { 
                 p a d d i n g :   2 p x   4 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p o s t e r   { 
                 w i d t h :   1 8 p x ; 
                 h e i g h t :   2 7 p x ; 
         } 
         
         . s e a r c h - r e s u l t - t i t l e   { 
                 f o n t - s i z e :   9 p x ; 
         } 
         
         . s e a r c h - r e s u l t - m e t a   { 
                 f o n t - s i z e :   7 p x ; 
         } 
         
         . s e a r c h - r e s u l t - p r i c e   { 
                 f o n t - s i z e :   8 p x ; 
         } 
 } 
 
 / *   "5<=0O  B5<0  4;O  :><?0:B=>3>  ?>8A:0  * / 
 [ d a t a - t h e m e = \ 
 
 d a r k \ ]   . g l o b a l - s e a r c h - r e s u l t s   { 
         b a c k g r o u n d :   v a r ( - - a d m i n - l i g h t ) ; 
         b o r d e r - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t s - h e a d e r   { 
         b a c k g r o u n d :   v a r ( - - a d m i n - l i g h t ) ; 
         b o r d e r - b o t t o m - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - i t e m   { 
         b o r d e r - b o t t o m - c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - i t e m : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - t i t l e   { 
         c o l o r :   v a r ( - - a d m i n - d a r k ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - r e s u l t - m e t a   { 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - n o - r e s u l t s   { 
         c o l o r :   v a r ( - - a d m i n - g r a y ) ; 
 } 
 
 [ d a t a - t h e m e = \ d a r k \ ]   . s e a r c h - n o - r e s u l t s   i   { 
         c o l o r :   v a r ( - - a d m i n - b o r d e r ) ; 
 } 
 
 / *   >78F8>=8@>20=85  ?>8A:>2>9  :>@>1:8  * / 
 . h e a d e r - a c t i o n s   { 
         p o s i t i o n :   r e l a t i v e ; 
 } 
 
 . s e a r c h - b o x   { 
         p o s i t i o n :   r e l a t i v e ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
 } 
 
 
/* ============= КОМПАКТНЫЙ ГЛОБАЛЬНЫЙ ПОИСК ============= */

.global-search-results {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    max-height: 420px;
    overflow: hidden;
    contain: layout style paint;
    will-change: transform;
    pointer-events: auto;
    /* Position will be set dynamically via JavaScript */
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.search-view-all {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.search-view-all:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.search-results-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 2px 0;
}

/* Кастомный скроллбар для списка результатов */
.search-results-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.search-results-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
    min-height: 60px;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.search-result-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-no-results i {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--text-light);
    display: block;
}

.search-no-results p {
    margin: 4px 0;
    font-weight: 500;
}

.search-no-results small {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .global-search-results {
        max-width: calc(100vw - 40px);
        max-height: 380px;
    }
    
    .search-results-list {
        max-height: 320px;
    }
    
    .search-result-item {
        padding: 8px 10px;
        gap: 8px;
        min-height: 56px;
    }
    
    .search-result-poster {
        width: 36px;
        height: 54px;
    }
    
    .search-result-title {
        font-size: 12px;
    }
    
    .search-result-meta {
        font-size: 10px;
    }
    
    .search-result-price {
        font-size: 12px;
    }
    
    .search-results-header {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .search-view-all {
        padding: 3px 8px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .global-search-results {
        width: calc(100vw - 40px);
        max-width: 300px;
        max-height: 350px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .search-results-list {
        max-height: 280px;
    }
    
    .search-result-item {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .search-result-poster {
        width: 35px;
        height: 52px;
    }
    
    .search-result-title {
        font-size: 12px;
    }
    
    .search-result-meta {
        font-size: 10px;
    }
    
    .search-result-price {
        font-size: 12px;
    }
    
    .search-results-header {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .search-view-all {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* Темная тема для поиска */
[data-theme="dark"] .global-search-results {
    background: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .search-results-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

[data-theme="dark"] .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .search-result-title {
    color: #ffffff;
}

[data-theme="dark"] .search-result-meta {
    color: var(--text-light);
}

[data-theme="dark"] .search-no-results {
    color: var(--text-light);
}

[data-theme="dark"] .search-no-results i {
    color: var(--text-secondary);
}

[data-theme="dark"] .search-view-all {
    background: var(--primary-color);
}

[data-theme="dark"] .search-view-all:hover {
    background: var(--primary-dark);
}

/* Позиционирование поисковой коробки */
.header-actions {
    position: relative;
    overflow: visible;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 100;
}

/* Защита от влияния на body scroll */
body {
    overflow-x: hidden;
}
