* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            margin: 0;
            display: flex;
            flex-direction: column;
        }
        
        .container {
            max-width: 900px;
            width: 100%;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            padding: 40px;
            display: flex;
            flex-direction: column;
            min-height: 0;
            flex: 1;
        }
        
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 10px;
            font-size: 2.8em;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            flex-shrink: 0;
        }
        
        .subtitle {
            text-align: center;
            color: #666;
            margin-bottom: 15px;
            font-size: 1.2em;
            font-weight: 500;
        }
        
        .description {
            text-align: center;
            color: #555;
            margin-bottom: 30px;
            line-height: 1.6;
            font-size: 1em;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .search-form {
            margin-bottom: 30px;
        }
        
        .search-input {
            width: 100%;
            padding: 15px 20px;
            font-size: 16px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            outline: none;
            transition: border-color 0.3s;
        }
        
        .search-input:focus {
            border-color: #667eea;
        }
        
        .search-button {
            width: 100%;
            padding: 15px;
            margin-top: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .search-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        .search-button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        .chat-container {
            margin-bottom: 24px;
            border: 2px solid #e8e8e8;
            border-radius: 16px;
            overflow: hidden;
            background: #fafafa;
            display: flex;
            flex-direction: column;
            min-height: 0;
            flex: 1;
        }
        
        .chat-messages {
            min-height: 120px;
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .chat-messages .msg.assistant:last-child {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
            align-items: flex-start;
        }
        .chat-messages .msg.assistant:last-child .carousel-container {
            flex: 1;
            min-height: 0;
            max-height: none;
            width: 100%;
        }
        
        .chat-form {
            margin-bottom: 0;
            padding: 12px 16px;
            background: white;
            border-top: 2px solid #e8e8e8;
            flex-shrink: 0;
        }
        
        .msg {
            max-width: 85%;
            padding: 12px 16px;
            border-radius: 14px;
            line-height: 1.5;
        }
        
        .msg.user {
            align-self: flex-end;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        
        .msg.assistant {
            align-self: flex-start;
            background: white;
            border: 1px solid #e0e0e0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        
        .msg.assistant .msg-text {
            color: #333;
        }
        
        .msg .movie-cards-inline {
            margin-top: 12px;
        }
        
        .msg .carousel-container {
            margin-top: 8px;
            display: flex;
            flex-direction: column;
            max-height: min(70vh, 520px);
            min-height: 0;
        }
        
        .msg .carousel-counter {
            flex-shrink: 0;
        }
        
        .msg .carousel-dots .dot.active {
            background: var(--primary-color, #2563eb);
        }
        
        .msg .carousel-label.carousel-label-active {
            background: var(--primary-color, #2563eb);
            border-color: var(--primary-color, #2563eb);
            color: #fff;
        }
        
        .msg .carousel-label.carousel-label-active:hover {
            filter: brightness(1.1);
        }
        
        .msg .carousel-card-slot {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        
        .msg .carousel-card-slot .movie-card {
            margin-bottom: 0;
            display: flex;
            flex-direction: column;
            overflow: visible;
            min-height: min-content;
        }
        
        .msg .carousel-buttons {
            flex-shrink: 0;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 2px solid #e0e0e0;
            background: #f8f8f8;
            padding-bottom: 4px;
        }
        .msg .msg-service-below {
            margin-top: 12px;
            padding: 10px 14px;
            background: #e8eef7;
            color: #334155;
            border-radius: 12px;
            border: 1px solid #c7d2e4;
            align-self: flex-start;
            max-width: 85%;
            line-height: 1.45;
            font-size: 0.95em;
        }
        
        .examples {
            margin-top: 30px;
            padding: 20px;
            background: #f5f5f5;
            border-radius: 10px;
        }
        
        .intro-text {
            flex-shrink: 0;
        }
        
        .examples.hidden,
        .intro-text.hidden {
            display: none;
        }
        
        .examples h3 {
            margin-bottom: 15px;
            color: #333;
        }
        
        .example-item {
            padding: 10px;
            margin: 5px 0;
            background: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .example-item:hover {
            background: #e8e8e8;
        }
        
        .loading {
            text-align: center;
            padding: 20px;
            color: #666;
            display: none;
        }
        
        .loading.active {
            display: block;
        }
        
        /* Модальное окно загрузки */
        .loading-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            animation: fadeIn 0.2s;
            align-items: center;
            justify-content: center;
        }
        
        .loading-modal.active {
            display: flex;
        }
        
        .loading-modal-content {
            background: white;
            padding: 40px 50px;
            border-radius: 20px;
            box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
            text-align: center;
            animation: scaleIn 0.3s ease-out;
        }
        
        .loading-spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        .loading-modal-text {
            font-size: 1.2em;
            color: #333;
            font-weight: 600;
            margin-bottom: 8px;
            transition: opacity 0.2s ease-in-out;
            min-height: 1.5em;
        }
        
        .loading-modal-subtext {
            font-size: 0.9em;
            color: #666;
            transition: opacity 0.2s ease-in-out;
            min-height: 1.3em;
        }
        
        .loading-modal-timer {
            font-size: 1.4em;
            font-weight: 700;
            color: #667eea;
            margin: 12px 0 8px;
            font-variant-numeric: tabular-nums;
        }
        
        .loading-modal-progress {
            height: 8px;
            background: #e8e8e8;
            border-radius: 4px;
            overflow: hidden;
            margin: 12px 0 20px;
            width: 100%;
        }
        
        .loading-modal-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 4px;
            width: 0%;
            transition: width 0.15s linear;
        }
        
        .loading-modal-cancel {
            margin-top: 8px;
            padding: 10px 24px;
            background: #fff;
            color: #666;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.95em;
            font-weight: 600;
            transition: all 0.2s;
        }
        
        .loading-modal-cancel:hover {
            background: #f5f5f5;
            border-color: #ccc;
            color: #333;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes scaleIn {
            from {
                transform: scale(0.8);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        .error {
            background: #fee;
            color: #c33;
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            display: none;
        }
        
        .error.active {
            display: block;
        }
        
        .question {
            background: #e3f2fd;
            color: #1976d2;
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            display: none;
        }
        
        .question.active {
            display: block;
        }
        
        .results {
            margin-top: 30px;
            display: none;
        }
        
        .results.active {
            display: block;
        }
        
        .carousel-container {
            margin-top: 24px;
        }
        
        .carousel-counter {
            text-align: center;
            margin-bottom: 12px;
        }
        .carousel-counter .carousel-dots {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
        }
        .carousel-counter:has(.carousel-labels) .carousel-dots {
            display: none;
        }
        
        .carousel-dots {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
        }
        
        .carousel-dots .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ccc;
            transition: background 0.2s;
        }
        
        .carousel-dots .dot.active {
            background: #333;
        }
        
        .carousel-labels {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .carousel-label {
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid #ddd;
            background: #f5f5f5;
            color: #333;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
            white-space: nowrap;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .carousel-label:hover {
            background: #eee;
            border-color: #ccc;
        }
        
        .carousel-label.carousel-label-active {
            background: #333;
            color: #fff;
            border-color: #333;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        
        .carousel-label.carousel-label-active:hover {
            background: #444;
            border-color: #444;
        }
        
        .carousel-card-wrapper {
            min-height: 200px;
            position: relative;
        }
        
        .carousel-card-wrapper.loading {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 200px;
            color: #666;
        }
        
        .carousel-buttons {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .carousel-btn {
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        
        .carousel-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        
        .carousel-btn.back {
            background: #f5f5f5;
            color: #555;
            border-color: #ddd;
        }
        
        .carousel-btn.back:hover:not(:disabled) {
            background: #e8e8e8;
        }
        
        .carousel-btn.next {
            background: #f5f5f5;
            color: #555;
            border-color: #ddd;
        }
        
        .carousel-btn.next:hover:not(:disabled) {
            background: #e8e8e8;
        }
        
        .carousel-btn.suitable {
            background: #4caf50;
            color: white;
            border-color: #4caf50;
        }
        
        .carousel-btn.suitable:hover:not(:disabled) {
            filter: brightness(1.1);
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
        }
        
        .carousel-btn.not-suitable {
            background: #f44336;
            color: white;
            border-color: #f44336;
        }
        
        .carousel-btn.not-suitable:hover:not(:disabled) {
            filter: brightness(1.1);
            box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
        }
        
        .movie-card {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 0;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
            overflow: hidden;
        }
        
        .movie-card:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
            border-color: #667eea;
        }
        
        .loading-card {
            padding: 40px;
            text-align: center;
            color: #666;
            font-size: 16px;
        }
        
        .movie-header {
            display: flex;
            gap: 25px;
            margin-bottom: 12px;
            align-items: flex-start;
            flex-shrink: 0;
        }
        
        .movie-poster {
            width: 120px;
            height: 180px;
            object-fit: cover;
            border-radius: 12px;
            flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        .movie-card:hover .movie-poster {
            transform: none;
        }
        
        .movie-info {
            flex: 1;
            min-width: 0;
        }
        
        .movie-title {
            font-size: 1.5em;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
            line-height: 1.2;
        }
        .movie-title-top {
            margin-bottom: 12px;
            padding-bottom: 0;
        }
        
        .movie-meta-line {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px 12px;
            margin-bottom: 8px;
        }
        .movie-meta-inline {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #666;
            font-size: 0.9em;
        }
        .movie-meta-line .movie-links {
            display: inline-flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .movie-meta-line .movie-rating-inline {
            font-weight: bold;
            color: #333;
        }
        .movie-meta {
            color: #666;
            margin-bottom: 6px;
            font-size: 0.9em;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .movie-meta-icon {
            font-size: 1em;
        }
        
        .movie-rating {
            display: inline-flex;
            align-items: center;
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            color: #333;
            padding: 4px 10px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 0.9em;
            box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
        }
        
        .movie-links-rating-row {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            margin-bottom: 6px;
        }
        
        .movie-link-rating-pair {
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        
        .movie-links-rating-row .movie-links a {
            margin-right: 0;
        }
        
        .movie-rating-inline {
            font-weight: bold;
            color: #333;
        }
        
        .movie-streaming-block {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid #eee;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px 12px;
        }
        
        .movie-streaming-block .streaming-label {
            color: #555;
            font-size: 0.9em;
            font-weight: 600;
            margin: 0;
            flex-shrink: 0;
        }
        
        .movie-streaming-block .streaming-services {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 8px;
        }
        
        .movie-streaming-ratings {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        
        .movie-streaming-block .streaming-link {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.85em;
            font-weight: 500;
            text-decoration: none;
            color: #5a67d8;
            background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
            border: 1px solid rgba(90, 103, 216, 0.2);
            transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
            cursor: pointer;
        }
        
        .movie-streaming-block .streaming-link:hover {
            background: linear-gradient(135deg, #5a67d8 0%, #434190 100%);
            color: white;
            border-color: transparent;
            box-shadow: 0 2px 10px rgba(90, 103, 216, 0.35);
            transform: translateY(-1px);
        }
        
        .movie-streaming-block .streaming-link[data-type="free"],
        .movie-streaming-block .streaming-link.streaming-link-free {
            color: #047857;
            background: linear-gradient(135deg, #00ffff 0%, #d1fae5 100%);
            border-color: rgba(4, 120, 87, 0.25);
            min-width: 165px;
            min-height: 48px;
            text-align: center;
            line-height: 1.25;
        }
        
        .movie-streaming-block .streaming-link[data-type="free"]:hover,
        .movie-streaming-block .streaming-link.streaming-link-free:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            color: white;
            border-color: transparent;
            box-shadow: 0 2px 10px rgba(4, 120, 87, 0.35);
        }
        
        .movie-description-wrap {
            display: flex;
            flex-direction: column;
            margin-top: 12px;
        }
        
        .movie-description {
            color: #555;
            line-height: 1.55;
            font-size: 0.9em;
            max-height: 4.65em;
            overflow: hidden;
            transition: max-height 0.25s ease;
        }
        
        .movie-description-wrap.expanded .movie-description {
            max-height: none;
            overflow: visible;
        }
        
        .movie-description-wrap.short .movie-description {
            max-height: none;
            overflow: visible;
        }
        
        .movie-description-toggle {
            margin-top: 6px;
            padding: 4px 0;
            background: none;
            border: none;
            color: #667eea;
            font-size: 0.85em;
            font-weight: 600;
            cursor: pointer;
            align-self: flex-start;
            flex-shrink: 0;
        }
        
        .movie-description-toggle:hover {
            text-decoration: underline;
        }
        
        .movie-links-row {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 2px solid #f0f0f0;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px 12px;
            flex-shrink: 0;
        }
        
        .movie-links {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .movie-links a,
        .streaming-services a {
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            padding: 6px 12px;
            border-radius: 8px;
            background: #f5f7ff;
            font-size: 0.9em;
            transition: all 0.2s;
            border: 2px solid transparent;
        }
        
        .movie-links a:hover,
        .streaming-services a:hover {
            background: #667eea;
            color: white;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
        }
        
        .streaming-services {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 10px;
        }
        
        .streaming-services .streaming-label {
            color: #555;
            font-size: 0.9em;
            margin-right: 2px;
        }
        
        .streaming-loading {
            display: inline;
        }
        
        .streaming-message {
            color: #666;
            font-style: italic;
        }
        .streaming-message.streaming-error {
            color: #c0392b;
            font-style: normal;
        }
        
        /* Кнопка «Где посмотреть»: под ней раскрывается список сервисов */
        .movie-streaming-block .streaming-services-list {
            margin-top: 8px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 8px;
        }
        .movie-streaming-block .streaming-services-list.hidden {
            display: none;
        }
        .btn-where-to-watch-toggle {
            padding: 6px 14px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9em;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .btn-where-to-watch-toggle:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
        }
        .btn-where-to-watch-toggle[aria-expanded="true"] {
            border-radius: 8px 8px 0 0;
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .container {
                padding: 16px 12px;
            }
            
            .chat-container {
                margin-left: -12px;
                margin-right: -12px;
                margin-bottom: 12px;
                border-radius: 12px;
            }
            
            .chat-messages {
                padding-left: 12px;
                padding-right: 12px;
            }
            
            .msg {
                max-width: 100%;
            }
            
            .msg .carousel-container,
            .msg .carousel-card-slot,
            .msg .movie-card {
                max-width: 100%;
            }
            .msg .carousel-card-slot {
                padding: 0;
            }
            .msg .movie-card {
                width: 100%;
                box-sizing: border-box;
            }
            .carousel-counter .carousel-labels {
                display: none !important;
            }
            .carousel-counter .carousel-dots {
                display: flex !important;
                gap: 5px;
                margin-bottom: 6px;
            }
            .carousel-counter .carousel-dots .dot {
                width: 6px;
                height: 6px;
            }
            .msg .carousel-buttons {
                margin-top: 6px;
                padding-top: 8px;
                padding-bottom: 4px;
            }
            .msg .msg-service-below {
                margin-top: 10px;
                font-size: 0.95em;
                max-width: 100%;
            }
            .chat-messages .msg.assistant:last-child .carousel-container {
                flex: 1;
                min-height: 0;
                max-height: none;
            }
            .footer {
                margin-top: 12px;
                padding-top: 12px;
            }
            
            h1 {
                font-size: 2em;
            }
            
            .subtitle {
                font-size: 1.05em;
            }
            
            .description {
                font-size: 0.9em;
                padding: 0 8px;
            }
            
            .msg .carousel-container {
                max-height: min(65vh, 420px);
            }
            .chat-messages .msg.assistant:last-child .carousel-container {
                max-height: none;
            }
            
            .movie-header {
                flex-direction: row;
                gap: 12px;
                margin-bottom: 8px;
            }
            
            .movie-poster {
                width: 80px;
                height: 120px;
                flex-shrink: 0;
            }
            
            .movie-title {
                font-size: 1.2em;
                text-align: left;
            }
            
            .movie-meta-line {
                font-size: 0.85em;
                gap: 6px 10px;
                margin-bottom: 6px;
            }
            .movie-meta-line .movie-meta-inline {
                flex-shrink: 0;
            }
            .movie-meta-line .movie-rating-inline {
                min-width: 2.2em;
                display: inline-block;
                text-align: left;
            }
            .movie-meta {
                font-size: 0.8em;
                margin-bottom: 4px;
            }
            
            .movie-description {
                font-size: 0.85em;
                line-height: 1.45;
                margin-top: 6px;
            }
            
            .movie-info {
                width: 100%;
            }
            
            .movie-links-row {
                margin-top: 8px;
                padding-top: 8px;
            }
            
            .movie-links a,
            .streaming-services a {
                padding: 5px 10px;
                font-size: 0.85em;
            }
            
            .chat-form {
                position: sticky;
                bottom: 0;
                left: 0;
                right: 0;
                background: white;
                z-index: 10;
                padding: 8px 12px 12px;
                padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
            }
            .chat-messages {
                padding-bottom: 16px;
            }
            .msg.assistant .msg-text {
                word-wrap: break-word;
                overflow-wrap: break-word;
            }
            .footer .contacts {
                flex-wrap: nowrap;
                justify-content: center;
                gap: 12px;
                margin-bottom: 0;
            }
            .footer .contact-item span:not(.contact-icon) {
                display: none;
            }
            .footer .contact-item {
                padding: 10px;
            }
            .footer .contact-item .contact-icon {
                width: 28px;
                height: 28px;
            }
            
            .carousel-counter {
                margin-bottom: 8px;
                font-size: 0.9em;
            }
            
            .carousel-buttons {
                margin-top: 12px;
                gap: 8px;
            }
            
            .carousel-btn .carousel-btn-text {
                display: none;
            }
            .carousel-btn {
                padding: 10px 14px;
                min-width: 44px;
                min-height: 44px;
                font-size: 1.2em;
            }
        }
        
        @media (max-width: 480px) {
            body {
                padding: 8px;
            }
            
            .container {
                padding: 12px 10px;
            }
            
            .chat-container {
                margin-left: -10px;
                margin-right: -10px;
            }
            
            .chat-messages {
                padding: 10px;
                padding-bottom: 24px;
            }
            
            .chat-form {
                padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
            }
            
            h1 {
                font-size: 1.6em;
            }
            
            .msg .carousel-container {
                max-height: min(58vh, 380px);
            }
            .chat-messages .msg.assistant:last-child .carousel-container {
                max-height: none;
            }
            
            .movie-card {
                padding: 12px 10px;
            }
            
            .movie-poster {
                width: 70px;
                height: 105px;
            }
            
            .movie-title {
                font-size: 1.1em;
            }
            
            .movie-description {
                font-size: 0.8em;
            }
            
            .chat-form {
                padding: 10px 12px;
            }
            
            .search-input {
                padding: 12px 14px;
                font-size: 16px;
            }
            
            .search-button {
                padding: 12px;
                margin-top: 10px;
            }
        }
        
        /* Стили для футера с контактами */
        .footer {
            margin-top: 24px;
            padding: 20px 0 16px;
            border-top: 2px solid #e0e0e0;
            text-align: center;
            color: #666;
            flex-shrink: 0;
        }
        
        .footer h3 {
            color: #333;
            margin-bottom: 15px;
            font-size: 1.2em;
        }
        
        .contacts {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }
        .footer .contacts {
            flex-wrap: nowrap;
            gap: 16px;
            margin-bottom: 0;
        }
        
        .contact-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.2s;
            padding: 8px 15px;
            border-radius: 8px;
            background: #f5f7ff;
        }
        
        .contact-item:hover {
            background: #667eea;
            color: white;
            transform: translateY(-2px);
        }
        
        .contact-item .contact-icon {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .contact-item .contact-icon svg {
            width: 100%;
            height: 100%;
        }
        .contact-item:hover .contact-icon svg {
            fill: currentColor;
        }
        
        .suggest-button {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .suggest-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        /* Стили для модальных окон */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            animation: fadeIn 0.3s;
        }
        
        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background: white;
            padding: 35px;
            border-radius: 20px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.3s;
            position: relative;
        }
        
        .modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            font-weight: bold;
            color: #999;
            cursor: pointer;
            transition: color 0.2s;
            background: none;
            border: none;
            line-height: 1;
        }
        
        .modal-close:hover {
            color: #333;
        }
        
        .modal h2 {
            margin-bottom: 20px;
            color: #333;
            font-size: 1.8em;
        }
        
        .modal textarea {
            width: 100%;
            padding: 15px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 16px;
            font-family: inherit;
            resize: vertical;
            min-height: 120px;
            outline: none;
            transition: border-color 0.3s;
        }
        
        .modal textarea:focus {
            border-color: #667eea;
        }
        
        .modal-submit {
            width: 100%;
            padding: 15px;
            margin-top: 15px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .modal-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        
        .modal-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        /* Модальное окно видеоплеера (встроенный плеер на сайте) */
        .player-modal {
            display: none;
            position: fixed;
            z-index: 1100;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.92);
            animation: fadeIn 0.3s;
        }
        
        .player-modal.active {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: stretch;
        }
        
        .player-modal-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 12px 16px;
            min-height: 0;
        }
        
        .player-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
            padding: 8px 0 12px;
            gap: 12px;
        }
        
        .player-modal-title {
            color: #fff;
            font-size: 1em;
            font-weight: 600;
        }
        
        .player-modal-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .player-modal-open-external {
            padding: 6px 12px;
            font-size: 0.85em;
            background: rgba(255,255,255,0.15);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 8px;
            cursor: pointer;
            text-decoration: none;
            transition: background 0.2s, border-color 0.2s;
        }
        
        .player-modal-open-external:hover {
            background: rgba(255,255,255,0.25);
            border-color: rgba(255,255,255,0.5);
            color: #fff;
        }
        
        .player-modal-close {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            font-weight: bold;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            background: rgba(255,255,255,0.1);
            border: none;
            border-radius: 10px;
            transition: background 0.2s, color 0.2s;
        }
        
        .player-modal-close:hover {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }
        
        .player-modal-iframe-wrap {
            flex: 1;
            min-height: 0;
            border-radius: 12px;
            overflow: hidden;
            background: #000;
        }
        
        .player-modal-iframe-wrap iframe {
            width: 100%;
            height: 100%;
            min-height: 400px;
            border: none;
        }
        
        @media (max-width: 768px) {
            .player-modal-content { padding: 8px; }
            .player-modal-iframe-wrap iframe { min-height: 280px; }
        }
        
        /* Стили для оценки сайта */
        .rating-stars {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 25px 0;
            font-size: 2.5em;
        }
        
        .rating-star {
            cursor: pointer;
            color: #ddd;
            transition: all 0.2s;
            user-select: none;
        }
        
        .rating-star:hover,
        .rating-star.active {
            color: #ffd700;
            transform: scale(1.2);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        /* Исчезающее уведомление (тост) */
        .toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            padding: 12px 24px;
            background: #333;
            color: white;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 500;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
            z-index: 10000;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        }
        .toast.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }
        
        @media (max-width: 768px) {
            .contacts {
                flex-direction: column;
                gap: 15px;
            }
            .footer .contacts {
                flex-direction: row;
                flex-wrap: nowrap;
            }
            
            .modal-content {
                padding: 25px;
            }
            
            .rating-stars {
                font-size: 2em;
            }
            
            .loading-modal-content {
                padding: 30px 40px;
            }
            
            .loading-spinner {
                width: 50px;
                height: 50px;
            }
            
            .loading-modal-text {
                font-size: 1.1em;
            }
            
            .loading-modal-subtext {
                font-size: 0.85em;
            }
        }