* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

.chat-container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #4a6cf7 0%, #6a5af9 100%);
    padding: 16px 0;
    text-align: center;
    flex-shrink: 0;
}

.header-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-banner {
    width: 100%;
    /* overflow: hidden; */
    background-color: #000;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.chat-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #f5f5f5;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-message.user .avatar {
    background: linear-gradient(135deg, #4a6cf7 0%, #6a5af9 100%);
}

.chat-message.user .avatar img {
    opacity: 0.8;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
    line-height: 1.6;
}

.kefu {
    margin-bottom: 100px;
}

.chat-message.bot .message-bubble {
    background-color: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #69c769 0%, #4caf50 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-bubble p {
    font-size: 15px;
    margin: 0;
}

.message-bubble strong {
    font-weight: 700;
}

.chat-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.chat-btn {
    background: linear-gradient(135deg, #4a6cf7 0%, #6a5af9 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.chat-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.chat-btn:active {
    transform: scale(0.98);
}

.chat-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.consult-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
    animation: pulse 1.5s ease-in-out infinite;
    margin-top: 8px;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
    }

    50% {
        box-shadow: 0 6px 20px rgba(255, 69, 0, 0.5);
    }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: typingBounce 1.4s ease-in-out infinite;
}

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

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

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 375px) {
    .message-bubble {
        max-width: 80%;
        padding: 10px 14px;
    }

    .message-bubble p {
        font-size: 14px;
    }

    .chat-btn {
        font-size: 15px;
        padding: 10px 20px;
    }
}