body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #0f172a;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.chat-container {
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
}

.chat-header {
    background: #0f172a;
    color: white;
    padding: 16px 20px 12px;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border-radius: 0;
}

.chat-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: white;
    line-height: 1.2;
}

.subtitle {
    font-size: 12px;
    opacity: 0.7;
    margin: 4px 0 0;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.divider {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4f46e5, transparent);
    margin: 8px auto;
}

.description {
    font-size: 13px;
    line-height: 1.4;
    margin: 2px 0;
    opacity: 0.9;
    font-weight: 300;
}

.description strong {
    font-weight: 600;
    color: #818cf8;
}

.status {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin: 8px auto 4px;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    align-self: flex-end;
    background: #4f46e5;
    color: white;
    border-radius: 0;
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: #0f172a;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.input-area {
    display: flex;
    padding: 16px;
    gap: 12px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

#messageInput {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    outline: none;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8fafc;
    font-style: italic;
    border-radius: 0;
}

#messageInput:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    font-style: normal;
}

#sendButton {
    width: 48px;
    height: 48px;
    border: none;
    background: #4f46e5;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
    border-radius: 0;
}

#sendButton:hover {
    transform: scale(1.05);
    background: #6366f1;
}

#sendButton:disabled {
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

/* Уменьшение шапки при скролле */
.chat-header.compact {
    padding: 8px 15px 6px;
}

.chat-header.compact h1 {
    font-size: 20px;
}

.chat-header.compact .subtitle {
    font-size: 10px;
    margin: 2px 0 0;
}

.chat-header.compact .divider {
    width: 30px;
    margin: 5px auto;
}

.chat-header.compact .description {
    font-size: 11px;
    margin: 2px 0;
}

.chat-header.compact .status {
    width: 4px;
    height: 4px;
    margin: 5px auto 2px;
}

/* Десктоп/планшет версия - полный экран */
@media (min-width: 768px) {
    body {
        background: #0f172a;
        display: flex;
        align-items: stretch;
        justify-content: center;
    }
    
    .chat-container {
        width: 100%;
        max-width: none;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .message {
        border-radius: 0;
    }
    
    #messageInput {
        border-radius: 0;
    }
    
    #sendButton {
        border-radius: 0;
    }
}
