body {
    font-family: 'Inter', sans-serif;
    background-color: #0d0d11;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(230, 46, 45, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(147, 51, 234, 0.08) 0%, transparent 40%);
}

/* Кастомный скроллбар в стиле киберпанк */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #12121a;
}

::-webkit-scrollbar-thumb {
    background: #252530;
    border-radius: 3px;
}

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

/* Эффект стекла (Glassmorphism) */
.glass-panel {
    background: rgba(18, 18, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Стили для кнопок-параметров (чипов) */
.chip {
    background: rgba(30, 30, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chip:hover:not(.disabled-element) {
    border-color: rgba(255, 59, 48, 0.5);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.15);
    transform: translateY(-1px);
}

.chip-active {
    background: linear-gradient(135deg, #ff3b3052 0%, #fb392fd4 100%) !important;
    border-color: #8D2425 !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.4);
    font-weight: 600;
}

.chip>img {
    width: 100%;
    height: 150px;
    object-fit: contain;
}

/* ========== ПЕРЕКЛЮЧЕНИЕ ВИДОВ: ПАРАМЕТРЫ ↔ ЧАТ ========== */
#view-container {
    position: relative;
    overflow: hidden;
}

.view-panel {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.5s;
}

/* Панель параметров: активна по умолчанию */
#config-panel.config-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
    z-index: 10;
    pointer-events: auto;
}

#config-panel.config-inactive {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
    visibility: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Панель чата: скрыта по умолчанию */
#chat-panel.chat-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
    z-index: 10;
    pointer-events: auto;
}

#chat-panel.chat-inactive {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    visibility: hidden;
    z-index: 0;
    pointer-events: none;
}

/* ========== ОВЕРЛЕЙ МАТРИЦЫ ========== */
#matrix-overlay {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.6s;
}

#matrix-overlay.matrix-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#matrix-overlay.matrix-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ========== ШАПКА ПАРАМЕТРОВ В ЧАТЕ ========== */
#chat-params-header {
    /* флекс-шапка над чатом */
}

.param-chip {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    color: #d1d5db;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.param-chip:hover {
    border-color: rgba(255, 59, 48, 0.5);
    background: rgba(255, 59, 48, 0.15);
}

.param-chip.active {
    background: rgba(255, 59, 48, 0.2);
    border-color: rgba(255, 59, 48, 0.6);
    color: #ff3b30;
}

/* ========== STICKY-ШАПКА ПАНЕЛИ ПАРАМЕТРОВ ========== */
#config-sticky-header {
    transition: box-shadow 0.3s ease;
}

/* Лёгкая тень при скролле контента под шапкой */
#config-panel::-webkit-scrollbar-track {
    margin-top: 52px;
}

/* ========== КНОПКА «В ЧАТ» В STICKY-ШАПКЕ ========== */
#back-to-chat-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: backToChatPulse 2s infinite ease-in-out;
}

@keyframes backToChatPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 59, 48, 0);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 59, 48, 0.25);
    }
}

#back-to-chat-btn:hover {
    animation: none;
    box-shadow: 0 0 16px rgba(255, 59, 48, 0.35);
}

/* ========== КНОПКА ИЗМЕНИТЬ ПАРАМЕТРЫ ========== */
#change-params-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#change-params-btn:hover {
    border-color: rgba(255, 59, 48, 0.5);
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.15);
}

/* ========== СТАРЫЕ СТИЛИ (СОХРАНЕНЫ) ========== */

/* Стили для двойного слайдера цен */
.slider-container {
    position: relative;
    width: 100%;
    height: 20px;
}

.slider-track-main {
    position: absolute;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.slider-track-active {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, #e62e2d, #ff3b30);
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
}

.range-input-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: none;
    pointer-events: none;
}

.range-input-wrapper input[type="range"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Стилизация ползунков (Chrome, Safari, Opera, Edge) */
.range-input-wrapper input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #ff3b30;
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
    transition: transform 0.1s ease, background-color 0.1s ease;
    z-index: 10;
    position: relative;
}

.range-input-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #ff3b30;
}

/* Стилизация ползунков (Firefox) */
.range-input-wrapper input[type="range"]::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #ff3b30;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
    transition: transform 0.1s ease, background-color 0.1s ease;
    z-index: 10;
    position: relative;
}

.range-input-wrapper input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #ff3b30;
}

/* Форматирование сообщений ИИ */
.ai-message {
    max-width: 800px !important;
}

.ai-message h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-left: 3px solid #ff3b30;
    padding-left: 8px;
}

/* ========== КНОПКА КОПИРОВАНИЯ НАЗВАНИЯ ПК ========== */
.copy-pc-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-pc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    outline: none;
}

.copy-pc-btn:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
    color: #ff3b30;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.2);
}

.copy-pc-btn:active {
    transform: scale(0.92);
}

.copy-pc-icon {
    pointer-events: none;
}

/* ========== TOAST УВЕДОМЛЕНИЕ ========== */
.copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 59, 48, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.copy-toast svg {
    flex-shrink: 0;
}

.ai-message h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f3f4f6;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.ai-message p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #d1d5db;
}

.ai-message ul {
    list-style-type: none;
    padding-left: 0;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.ai-message li {
    font-size: 0.85rem;
    color: #9ca3af;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ai-message li:last-child {
    border-bottom: none;
}

#send-btn,
#apply-btn {
    background: linear-gradient(135deg, #ff3b3052 0%, #fb392fd4 100%) !important;
    border: 1px solid #BB2F29;
}

/* Кнопки-ссылки на товары в стиле Power-Art */
.product-link {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ff3b3052 0%, #fb392fd4 100%) !important;
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
    text-decoration: none;
    border: 1px solid #BB2F29;
}

.product-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
    filter: brightness(1.1);
}

/* Жесткая блокировка интерфейса */
.disabled-element {
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.logo-configurator {
    width: 170px !important;
}

.action-btn-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-title-config {
    font-size: 24px;
    font-weight: 600;
}

.product-title-config.copy-pc-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin: 1rem 0;
}

.product-image > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 14px;
}

.product-image > a > img {
    width: 100%;
    max-width: 400px;
    transition: 0.3s;
}

.product-image > a > img:hover {
    transform: scale(1.03);
}

.action-config-btn-container {
    position: sticky;
    top: -15px;
    z-index: 100;
    padding: 10px;
    border: 1px solid #ffffff1a;
    border-radius: 10px;
    background: #1B191E;
}

/* --- ЭФЕКТЫ ПОЯВЛЕНИЯ СООБЩЕНИЙ --- */
@keyframes decrypt-glow {
    0% {
        border-color: rgba(255, 59, 48, 0.6);
        box-shadow: 0 0 20px rgba(255, 59, 48, 0.3);
        transform: translateY(6px);
        opacity: 0;
    }

    100% {
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        transform: translateY(0);
        opacity: 1;
    }
}

.ai-message-new {
    animation: decrypt-glow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Стиль для пульсирующего плейсхолдера генерации */
.matrix-placeholder {
    border: 1px solid rgba(255, 59, 48, 0.4);
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.15);
    background: rgba(18, 18, 26, 0.9);
    animation: pulse-border 1.5s infinite ease-in-out;
}

@keyframes pulse-border {

    0%,
    100% {
        border-color: rgba(255, 59, 48, 0.3);
        box-shadow: 0 0 10px rgba(255, 59, 48, 0.1);
    }

    50% {
        border-color: rgba(255, 59, 48, 0.7);
        box-shadow: 0 0 20px rgba(255, 59, 48, 0.3);
    }
}

@keyframes matrix-scan {
    0% {
        top: 0%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0%;
    }
}

.animate-scan {
    animation: matrix-scan 2s linear infinite;
}

/* Эффект шума на заднем фоне заглушки */
.matrix-noise {
    background-image: radial-gradient(rgba(255, 59, 48, 0.15) 1px, transparent 0);
    background-size: 8px 8px;
}

/* ========== АДАПТИВНОСТЬ ========== */

/* Планшеты и ниже (до 1024px) */
@media (max-width: 1024px) {
    .logo-configurator {
        width: 130px !important;
    }

    #config-panel {
        padding: 12px !important;
    }

    #config-panel .space-y-6>div {
        padding: 12px !important;
    }

    .chip {
        font-size: 11px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    #chat-messages {
        padding: 16px !important;
    }

    #chat-messages .ai-message,
    #chat-messages .bg-\[\#ff3b30\]\/10 {
        max-width: 90% !important;
    }

    #chat-params-header {
        padding: 8px 12px !important;
    }

    .param-chip {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    #change-params-btn {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }

    /* Sticky-шапка на планшетах */
    #config-sticky-header {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #back-to-chat-btn {
        font-size: 10px !important;
        padding: 6px 8px !important;
    }
}

/* Планшеты (768px - 1023px) */
@media (max-width: 768px) {
    body {
        overflow: hidden !important;
    }

    .logo-configurator {
        width: 110px !important;
    }

    header {
        padding: 10px 12px !important;
    }

    header .h-6 {
        display: none;
    }

    header .text-xs.font-medium {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }

    #reset-btn {
        font-size: 10px !important;
        padding: 6px 10px !important;
    }

    /* Основной контейнер — flex колонка на всю высоту */
    .flex-1.w-full.max-w-\[1740px\] {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 8px !important;
        height: calc(100vh - 60px) !important;
    }

    /* Мобильные табы */
    .mobile-tabs {
        display: flex !important;
        flex-shrink: 0 !important;
    }

    /* Контейнер с видами занимает всё пространство */
    #view-container {
        flex: 1 !important;
        min-height: 0 !important;
    }

    /* Панели: на мобильных видах переключение остаётся через opacity/transform, 
       табы управляют через JS */
    #config-panel,
    #chat-panel {
        border-radius: 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #config-panel {
        padding: 0 !important;
    }

    #chat-panel {
        padding: 0 !important;
    }

    #chat-panel #chat-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px !important;
    }

    #chat-panel #input-panel {
        flex-shrink: 0 !important;
        padding: 10px !important;
        flex-wrap: nowrap !important;
    }

    #user-input {
        font-size: 13px !important;
        padding: 10px 14px !important;
    }

    #send-btn {
        font-size: 11px !important;
        padding: 10px 16px !important;
        white-space: nowrap;
    }

    /* Скрываем десктопный сепаратор */
    .flex.h-full.gap-4>.w-\[1px\] {
        display: none;
    }

    /* Чипы в 2 колонки */
    #config-panel .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    #config-panel .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Сводка конфигурации */
    #config-panel .text-base.font-extrabold {
        font-size: 13px !important;
    }

    #config-panel .text-\[10px\].font-bold.text-gray-500 {
        font-size: 9px !important;
    }

    #summary-budget,
    #summary-cpu,
    #summary-gpu,
    #summary-ssd {
        font-size: 11px !important;
    }

    /* Бюджет */
    #budget-display-val {
        font-size: 11px !important;
    }

    /* Кнопка "Применить" */
    #apply-btn {
        font-size: 10px !important;
        padding: 6px 10px !important;
    }

    #apply-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Сообщения чата */
    #chat-messages .ai-message h3 {
        font-size: 14px !important;
    }

    #chat-messages .ai-message h4 {
        font-size: 13px !important;
    }

    #chat-messages .ai-message p,
    #chat-messages .ai-message li {
        font-size: 13px !important;
    }

    /* Шапка параметров в чате на мобильных */
    #chat-params-header {
        padding: 6px 8px !important;
        gap: 4px !important;
    }

    .param-chip {
        font-size: 8px !important;
        padding: 2px 5px !important;
    }

    .param-chip svg {
        width: 10px !important;
        height: 10px !important;
    }

    #change-params-btn {
        font-size: 8px !important;
        padding: 3px 6px !important;
    }

    /* Слайдер */
    .slider-container {
        height: 32px !important;
    }

    .range-input-wrapper input[type="range"]::-webkit-slider-thumb {
        height: 20px !important;
        width: 20px !important;
    }

    .product-link {
        font-size: 10px !important;
        padding: 5px 12px !important;
    }

    /* На мобильных — панели всегда absolute относительно view-container */
    #config-panel,
    #chat-panel {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    #matrix-overlay {
        border-radius: 16px !important;
    }

    /* Sticky-шапка на мобильных */
    #config-sticky-header {
        padding: 8px 12px !important;
        gap: 6px !important;
    }

    #config-sticky-header h2 {
        font-size: 13px !important;
    }

    #back-to-chat-btn {
        font-size: 9px !important;
        padding: 5px 7px !important;
    }

    #back-to-chat-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    header {
        padding: 8px 10px !important;
    }

    header .text-xs.font-medium {
        display: none;
    }

    #reset-btn {
        font-size: 9px !important;
        padding: 5px 8px !important;
    }

    .flex-1.w-full.max-w-\[1740px\] {
        padding: 4px !important;
        height: calc(100vh - 52px) !important;
    }

    #config-panel,
    #chat-panel {
        border-radius: 12px !important;
    }

    #config-panel {
        padding: 0 !important;
    }

    #config-panel .space-y-6>div {
        padding: 10px !important;
    }

    #chat-panel #chat-messages {
        padding: 12px !important;
    }

    #chat-messages .ai-message,
    #chat-messages .bg-\[\#ff3b30\]\/10 {
        max-width: 95% !important;
        padding: 12px !important;
    }

    #user-input {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    #send-btn {
        font-size: 10px !important;
        padding: 8px 12px !important;
    }

    #input-panel {
        padding: 8px !important;
        gap: 6px !important;
    }

    .chip {
        font-size: 10px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        border-radius: 8px !important;
    }

    #config-panel .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    #config-panel .grid-cols-2 {
        gap: 6px !important;
    }

    /* Сводка */
    #config-panel .text-base.font-extrabold {
        font-size: 12px !important;
    }

    #summary-budget,
    #summary-cpu,
    #summary-gpu,
    #summary-ssd {
        font-size: 10px !important;
    }

    #budget-display-val {
        font-size: 10px !important;
    }

    /* Сообщения */
    #chat-messages .ai-message h3 {
        font-size: 13px !important;
    }

    #chat-messages .ai-message p,
    #chat-messages .ai-message li {
        font-size: 12px !important;
    }

    /* Шапка параметров в чате на телефонах */
    #chat-params-header {
        padding: 4px 6px !important;
        gap: 3px !important;
    }

    .param-chip {
        font-size: 7px !important;
        padding: 1px 4px !important;
    }

    #change-params-btn {
        font-size: 7px !important;
        padding: 2px 5px !important;
    }

    /* Слайдер */
    .range-input-wrapper input[type="range"]::-webkit-slider-thumb {
        height: 18px !important;
        width: 18px !important;
    }

    /* Матрица */
    #matrix-overlay .font-extrabold.uppercase {
        font-size: 10px !important;
    }

    #matrix-overlay .text-\[10px\].text-gray-500 {
        font-size: 9px !important;
    }

    .logo-configurator {
        display: none;
    }

    /* Sticky-шапка на телефонах */
    #config-sticky-header {
        padding: 6px 10px !important;
        gap: 4px !important;
    }

    #config-sticky-header h2 {
        font-size: 12px !important;
    }

    #config-sticky-header .w-1\.5 {
        width: 3px !important;
        height: 14px !important;
    }

    #back-to-chat-btn {
        font-size: 8px !important;
        padding: 4px 6px !important;
    }

    #back-to-chat-btn svg {
        width: 10px !important;
        height: 10px !important;
    }
}

/* Большие экраны (1920px+) */
@media (min-width: 1920px) {
    .logo-configurator {
        width: 200px !important;
    }

    #config-panel {
        padding: 0 !important;
    }

    #config-panel .chip {
        font-size: 14px !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    #chat-messages {
        padding: 28px !important;
    }

    #chat-messages .ai-message p {
        font-size: 16px !important;
    }

    #chat-messages .ai-message h3 {
        font-size: 18px !important;
    }

    #chat-messages .ai-message li {
        font-size: 15px !important;
    }

    #user-input {
        font-size: 16px !important;
        padding: 16px 20px !important;
    }

    #send-btn {
        font-size: 14px !important;
        padding: 16px 28px !important;
    }

    #config-sticky-header {
        padding: 16px 28px !important;
    }
}

/* Мобильные табы (скрыты на десктопе) */
.mobile-tabs {
    display: none;
    width: 100%;
    gap: 4px;
    padding: 4px;
    background: rgba(18, 18, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 8px;
}

.mobile-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-tab.active {
    background: linear-gradient(135deg, #ff3b30 0%, #e62e2d 100%);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.3);
}

.mobile-tab:hover:not(.active) {
    color: #9ca3af;
}

/* Плавный переход для мобильного layout */
@media (max-width: 768px) {
    .mobile-panel {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .mobile-panel.hidden-mobile {
        display: none !important;
    }
}

/* ========== БОКОВАЯ ПАНЕЛЬ ПАРАМЕТРОВ (САЙДБАР) ========== */
#main-content-row {
    position: relative;
}

#side-panel {
    width: 240px;
    min-width: 240px;
    max-height: 100%;
    transition: opacity 0.35s ease, transform 0.35s ease, width 0.35s ease, min-width 0.35s ease;
}

#side-panel.side-panel-hidden {
    opacity: 0;
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(20px);
}

.side-panel-width {
    width: 240px;
    min-width: 240px;
}

/* Блоки параметров в сайдбаре */
.side-param-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.side-param-block:hover {
    border-color: rgba(255, 59, 48, 0.2);
    background: rgba(255, 59, 48, 0.03);
}

.side-param-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.side-param-value {
    font-size: 12px;
    font-weight: 700;
    color: #d1d5db;
    display: block;
}

.side-param-value.text-\[\#ff3b30\] {
    color: #ff3b30 !important;
    text-shadow: 0 0 8px rgba(255, 59, 48, 0.2);
}

/* ========== ПОДСКАЗКИ НАД ПОЛЕМ ВВОДА ========== */
#prompt-hints {
    transition: all 0.3s ease;
    border-top: 1px solid rgb(255 255 255 / 0.05);
    margin-top: 10px;
    padding-bottom: 10px;
}

.prompt-hint-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
}

.prompt-hint-chip:hover {
    color: #ffffff;
    background: rgba(255, 59, 48, 0.12);
    border-color: rgba(255, 59, 48, 0.4);
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.15);
    transform: translateY(-1px);
}

.prompt-hint-chip:active {
    transform: scale(0.96);
    background: rgba(255, 59, 48, 0.2);
}

/* ========== ДЕСКТОП: САЙДБАР ВСЕГДА ВИДЕН РЯДОМ С ЧАТОМ ========== */
@media (min-width: 769px) {
    /* На десктопе панель параметров (config-panel) больше не absolute —
       она уже внутри view-container и переключается через JS */
    #main-content-row {
        display: flex;
        gap: 12px;
    }

    /* Когда активен чат — сайдбар виден */
    #side-panel {
        display: flex;
    }

    /* Когда активен конфиг — сайдбар скрыт (конфиг уже содержит параметры) */
    #side-panel.config-view-sidebar-hidden {
        opacity: 0;
        width: 0;
        min-width: 0;
        padding: 0;
        margin: 0;
        border: none;
        overflow: hidden;
        pointer-events: none;
        transform: translateX(20px);
    }
}

/* ========== АДАПТИВНОСТЬ САЙДБАРА ========== */
@media (max-width: 1024px) {
    #side-panel {
        width: 210px;
        min-width: 210px;
    }

    .side-param-block {
        padding: 8px 10px;
    }

    .side-param-label {
        font-size: 9px;
    }

    .side-param-value {
        font-size: 11px;
    }

    #change-params-btn {
        font-size: 9px !important;
        padding: 6px 8px !important;
    }

    .prompt-hint-chip {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* ========== МОБИЛЬНЫЕ: САЙДБАР СКРЫТ ========== */
@media (max-width: 768px) {
    #main-content-row {
        flex-direction: column;
        gap: 0;
    }

    #side-panel {
        display: none !important;
    }

    #prompt-hints {
        padding-left: 8px;
        padding-right: 8px;
        gap: 6px;
    }

    .prompt-hint-chip {
        font-size: 9px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .prompt-hint-chip {
        font-size: 8px;
        padding: 3px 7px;
    }

    #prompt-hints {
        padding-left: 4px;
        padding-right: 4px;
        gap: 4px;
    }
}
