.chatbot-header {
    background: var(--primary);
    color: var(--white);
    padding: 20px;
    padding: 20px 60px;
    position: relative;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 4px 20px rgba(4, 67, 137, 0.2);
    margin-bottom: 20px;
}

.chatbot-header .back-button {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.chatbot-header .back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.chatbot-header .back-button:active,
.chatbot-header .back-button.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(0.95);
}

.chatbot-header h2 {
    font-size: 28px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.chatbot-header p {
    font-size: 16px;
    text-align: center;
    opacity: 0.9;
    margin: 0;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
}

.message {
    margin-bottom: 16px;
    max-width: 85%;
}

.message.user {
    margin-left: auto;
}

.message.ai {
    margin-right: auto;
}

.message-content {
    padding: 16px;
    border-radius: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.message.user .message-content {
    background: var(--primary);
    color: var(--white);
}

.message.ai .message-content {
    background: var(--gray-100);
    color: var(--text);
}

.message.ai .message-content.error {
    background: var(--error-light);
    color: var(--error);
}

.chat-input {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-50);
    border-radius: 16px;
    padding: 8px 16px;
}

.chat-input input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 0;
    background: none;
    color: var(--text);
}

.chat-input input::placeholder {
    color: var(--gray-400);
}

.send-button {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.send-button:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
}

.send-button:active {
    transform: scale(0.95);
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: var(--gray-100);
    border-radius: 20px;
    width: fit-content;
    margin: 8px 0;
}

.thinking-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.4s infinite;
    opacity: 0.6;
}

.thinking-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}