/* 组件样式 */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.icon-placeholder {
    font-size: 2.5rem;
}

/* 关于我们页面特定样式 */
.page-header {
    background-color: var(--light-blue);
    padding: var(--spacing-xxl) 0;
    margin-top: 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark-blue);
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--dark-gray);
}

.about-stats {
    display: flex;
    justify-content: space-around;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-blue);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-year {
    width: 100px;
    height: 100px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    padding: 0 var(--spacing-lg);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

.culture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.culture-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.culture-icon {
    width: 100px;
    height: 100px;
    background-color: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 2.5rem;
}

.culture-item h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.honor-item {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.honor-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.honor-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 2rem;
}

.honor-item h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

.certifications {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.cert-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.cert-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 2rem;
}

.cert-item h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

/* 产品页面特定样式 */
.products-detail {
    margin-bottom: var(--spacing-xxl);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    height: 400px;
    background-color: var(--light-gray);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
}

.thumbnails {
    display: flex;
    gap: var(--spacing-sm);
}

.thumbnail {
    width: 80px;
    height: 80px;
    background-color: var(--light-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnail.active {
    border-color: var(--primary-blue);
}

.product-info h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark-blue);
}

.product-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    color: var(--dark-gray);
}

.product-features {
    margin-bottom: var(--spacing-lg);
}

.product-features h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark-blue);
}

.product-features ul {
    list-style: disc;
    margin-left: var(--spacing-lg);
}

.product-features li {
    margin-bottom: var(--spacing-sm);
    color: var(--dark-gray);
}

.product-specs {
    margin-bottom: var(--spacing-lg);
}

.product-specs h4 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--dark-blue);
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm);
    background-color: var(--light-gray);
    border-radius: var(--radius-sm);
}

.spec-name {
    color: var(--dark-gray);
}

.spec-value {
    font-weight: 500;
    color: var(--dark-blue);
}

.product-actions {
    display: flex;
    gap: var(--spacing-md);
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.accessory-item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.accessory-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.accessory-image {
    height: 200px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
}

.accessory-content {
    padding: var(--spacing-lg);
}

.accessory-content h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--dark-blue);
}

.accessory-content p {
    margin-bottom: var(--spacing-md);
    color: var(--dark-gray);
}

.accessory-specs {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.spec {
    font-size: 0.9rem;
    color: var(--dark-gray);
    padding: 4px 0;
    border-bottom: 1px solid var(--medium-gray);
}

/* 产品比较表格 */
.comparison-table {
    overflow-x: auto;
    margin-bottom: var(--spacing-xl);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table th,
.comparison-table td {
    padding: var(--spacing-md);
    text-align: center;
    border: 1px solid var(--medium-gray);
}

.comparison-table th {
    background-color: var(--light-blue);
    color: var(--dark-blue);
    font-weight: 600;
}

.comparison-table tr:nth-child(even) {
    background-color: var(--light-gray);
}

.feature-highlight {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 锚点导航 */
.section-nav {
    position: sticky;
    top: 100px;
    background-color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
    z-index: 10;
}

.section-nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.section-nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--dark-gray);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.section-nav-link:hover,
.section-nav-link.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* 咨询按钮组件样式 */
.consultation-widget {
    position: fixed;
    z-index: 9999;
}

/* 桌面端样式 */
@media (min-width: 769px) {
    .consultation-widget {
        bottom: 30px;
        right: 30px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: flex-end;
    }
    
    .consultation-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: var(--shadow-lg);
        transition: all 0.3s ease;
        cursor: pointer;
        border: none;
        position: relative;
    }
    
    .consultation-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
    
    .online-consult {
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
        color: var(--pure-white);
    }
    
    /* 隐藏桌面端的电话咨询按钮 */
    .phone-consult.desktop-only {
        display: none !important;
    }

    .phone-consult {
        background: linear-gradient(135deg, var(--accent-green) 0%, #218838 100%);
        color: var(--pure-white);
    }
    
    .btn-tooltip {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--pure-white);
        color: var(--text-dark);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        white-space: nowrap;
        box-shadow: var(--shadow-md);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .consultation-btn:hover .btn-tooltip {
        opacity: 1;
        right: 75px;
    }
    
    /* 隐藏移动端按钮 */
    .mobile-only {
        display: none !important;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .section-nav-list {
        flex-direction: column;
        align-items: center;
    }

    .consultation-widget {
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        background: var(--pure-white);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--medium-gray);
    }
    
    .consultation-btn {
        flex: 1;
        padding: 15px 10px;
        border: none;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        min-height: 70px;
    }
    
    .consultation-btn:active {
        background-color: var(--light-gray);
    }
    
    .btn-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }
    
    .btn-text {
        font-size: 0.8rem;
        font-weight: 500;
        color: var(--text-dark);
    }
    
    .online-consult .btn-icon {
        color: var(--primary-blue);
    }
    
    .phone-consult .btn-icon {
        color: var(--accent-green);
    }
    
    /* 添加分隔线 */
    .consultation-btn:first-child {
        border-right: 1px solid var(--medium-gray);
    }
    
    /* 隐藏桌面端按钮 */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
    
    .mobile-faq-toggle {
        display: flex;
        width: auto;
        min-width: 100px;
        padding: 10px 15px;
        margin-top: 0;
        white-space: nowrap;
    }
}

/* 咨询弹窗样式 */
.consultation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.consultation-modal.active {
    display: flex;
}

.modal-content {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
    height: 85vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.consultation-modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    color: var(--pure-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pure-white);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.contact-info {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.contact-info p {
    margin-bottom: var(--spacing-md);
    color: var(--dark-gray);
    line-height: 1.6;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-action-btn {
    padding: var(--spacing-md);
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-sm);
    background: var(--pure-white);
    color: var(--primary-blue);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.contact-action-btn:hover {
    background: var(--primary-blue);
    color: var(--pure-white);
}

.contact-action-btn.phone {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.contact-action-btn.phone:hover {
    background: var(--accent-green);
    color: var(--pure-white);
}

/* 咨询弹窗样式 - 现代化设计 */
.consultation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.consultation-modal.active {
    display: flex;
}

.modal-content {
    background: var(--pure-white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.consultation-modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    color: var(--pure-white);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--pure-white);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    height: 500px;
    min-height: 0;
}

/* 聊天界面样式 */
.chat-container {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0; /* 重要：允许内部滚动 */
}

/* 侧边栏 - 固定客服头像，可滚动常见问题 */
.chat-sidebar {
    width: 280px;
    background: var(--light-gray);
    border-right: 1px solid var(--medium-gray);
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
}

/* 主聊天区域 - 固定输入框，可滚动消息 */
/* 主聊天区域 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 消息区域 - 可滚动 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
    background: var(--pure-white);
}


/* 滚动条优化 */
.chat-messages::-webkit-scrollbar,
.faq-categories::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track,
.faq-categories::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.faq-categories::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.faq-categories::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}


/* 消息容器包装器 - 确保消息从底部开始 */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    animation: fadeInUp 0.3s ease;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 确保消息正确对齐 */

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    color: var(--pure-white);
    border-bottom-right-radius: 5px;
}

.message.bot .message-content {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 1px solid var(--medium-gray);
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

/* 快速问题区域固定高度 */
.quick-questions {
    display: none;
}

.quick-question {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: var(--pure-white);
    border: 1px solid var(--medium-gray);
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.quick-question:hover {
    background: var(--primary-blue);
    color: var(--pure-white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* 输入区域 - 固定在底部 */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--medium-gray);
    background: var(--light-gray);
    flex-shrink: 0;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 20px;
    font-size: 0.9rem;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    font-family: inherit;
    line-height: 1.4;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.send-button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    color: var(--pure-white);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* 客服信息样式 */
.agent-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--pure-white);
    flex-shrink: 0;
}

.agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: var(--pure-white);
    font-size: 1.5rem;
}

.agent-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-blue);
    font-size: 1rem;
}

.agent-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
}

/* 常见问题侧边栏 */
/* 侧边栏内容区域滚动 */
.faq-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
}

.faq-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-blue);
    font-size: 1rem;
    flex-shrink: 0;
}

.faq-categories {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.faq-category {
    margin-bottom: 20px;
}

.faq-category h5 {
    margin: 0 0 8px 0;
    color: var(--dark-blue);
    font-size: 0.9rem;
    font-weight: 600;
}

.faq-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    line-height: 1.4;
}

.faq-item:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

.faq-item:last-child {
    border-bottom: none;
}

/* 输入提示 */
.input-hint {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 8px;
    text-align: center;
}

/* 空状态 */
.empty-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--dark-gray);
    text-align: center;
    padding: 40px 20px;
}

.empty-chat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-chat-text {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-chat-hint {
    font-size: 0.85rem;
    opacity: 0.7;
    line-height: 1.4;
}

/* 打字指示器 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--light-gray);
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    max-width: 70px;
    margin-bottom: 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dark-gray);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 移动端常见问题弹窗 */
.mobile-faq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.mobile-faq-modal.active {
    display: flex;
}

.mobile-faq-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
    color: var(--pure-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.mobile-faq-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-faq-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pure-white);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-faq-body {
    background: var(--pure-white);
    border-radius: 0 0 15px 15px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.mobile-faq-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-faq-category h5 {
    margin: 0 0 10px 0;
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--medium-gray);
}

.mobile-faq-item {
    padding: 12px 15px;
    background: var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.mobile-faq-item:active {
    background: var(--primary-blue);
    color: var(--pure-white);
    transform: scale(0.98);
}

.mobile-faq-item:last-child {
    margin-bottom: 0;
}

/* 移动端常见问题按钮 */
.mobile-faq-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    background: var(--primary-blue);
    color: var(--pure-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: auto;
}

.mobile-faq-toggle:active {
    background: var(--dark-blue);
    transform: scale(0.98);
}

.faq-toggle-icon {
    font-size: 1.1rem;
}



/* 移动端响应式 */
@media (max-width: 768px) {
    .consultation-modal {
        padding: 10px;
    }
    
    .modal-content {
        height: 90vh;
        max-height: none;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        max-height: 15%; /* 大幅降低侧边栏高度 */
        border-right: none;
        border-bottom: 1px solid var(--medium-gray);
        padding: 12px 15px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }
    
    .chat-main {
        height: 85%;
    }

    /* 聊天消息区域 */
    .chat-messages {
        padding: 15px;
        flex: 1;
        overflow-y: auto;
    }

    /* 确保移动端滚动顺畅 */
    .chat-messages,
    .chat-sidebar,
    .faq-categories {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 输入区域优化 - 更紧凑的布局 */
    .chat-input-area {
        padding: 12px 15px;
        border-top: 1px solid var(--medium-gray);
        background: var(--light-gray);
        flex-shrink: 0;
    }
    
    .input-hint {
        font-size: 0.75rem;
        color: var(--dark-gray);
        margin-top: 8px;
        text-align: center;
    }

    .message-content {
        max-width: 85%;
    }
    
    .input-group {
        display: flex;
        gap: 10px;
        align-items: flex-end;
    }
    
    .message-input {
        flex: 1;
        padding: 10px 15px;
        border: 2px solid var(--medium-gray);
        border-radius: 20px;
        font-size: 0.9rem;
        resize: none;
        min-height: 40px;
        max-height: 80px;
        line-height: 1.4;
    }
    
    .send-button {
        padding: 10px 20px;
        background: linear-gradient(135deg, var(--primary-blue) 0%, var(--medium-blue) 100%);
        color: var(--pure-white);
        border: none;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 600;
        min-width: 60px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .send-button:active {
        transform: scale(0.95);
    }
    
    /* 移动端客服信息改为紧凑布局 */
    .agent-info {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 0;
        border-bottom: none;
        background: transparent;
        flex: 1;
        margin: 0;
    }
    
    .agent-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin: 0;
        flex-shrink: 0;
    }
    
    .agent-details {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .agent-info h4 {
        font-size: 0.9rem;
        margin: 0;
        color: var(--primary-blue);
        white-space: nowrap;
    }
    
    .agent-status {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.75rem;
        margin: 0;
        white-space: nowrap;
    }
    
    .status-dot {
        width: 5px;
        height: 5px;
        margin: 0;
    }
    
    .faq-section {
        padding: 15px;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .faq-section h4 {
        margin: 0 0 12px 0;
        font-size: 0.95rem;
        flex-shrink: 0;
    }
    
    .faq-categories {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .faq-category {
        margin-bottom: 15px;
    }
    
    .faq-category h5 {
        font-size: 0.85rem;
        margin: 0 0 6px 0;
        color: var(--dark-blue);
        font-weight: 600;
    }
    
    .faq-item {
        font-size: 0.8rem;
        padding: 6px 0;
        line-height: 1.3;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* 确保模态框内容正确滚动 */
    .modal-body {
        padding: 0;
        flex: 1;
        display: flex;
        height: 80vh;
        min-height: 0; /* 重要：允许内部滚动 */
    }

    /* 打字指示器定位 */
    .typing-indicator {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 15px 20px;
        background: var(--light-gray);
        border-radius: 18px;
        border-bottom-left-radius: 5px;
        max-width: 70%;
        margin-bottom: 20px;
        flex-shrink: 0; /* 防止被压缩 */
    }

    /* 空状态提示 */
    .empty-chat {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: var(--dark-gray);
        text-align: center;
        padding: 40px 20px;
    }

    .empty-chat-icon {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .empty-chat-text {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .empty-chat-hint {
        font-size: 0.9rem;
        opacity: 0.7;
    }

    .faq-category {
        margin-bottom: 15px;
    }
    
    .faq-item {
        font-size: 0.8rem;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .modal-body {
        height: 85vh;
    }
    
    .chat-sidebar {
        max-height: 12%; /* 在更小的屏幕上进一步降低侧边栏高度 */
        padding: 10px 12px;
        gap: 10px;
    }
    
    .chat-main {
        height: 88%;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .faq-categories {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .faq-category {
        margin-bottom: 12px;
    }
    
    .faq-item {
        font-size: 0.75rem;
        padding: 5px 0;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-button {
        width: 100%;
    }
    
    .agent-info {
        padding: 10px 12px;
        gap: 8px;
    }

    .agent-details {
        gap: 6px;
    }

    .agent-info h4 {
        font-size: 0.85rem;
    }
    
    .agent-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .agent-status {
        font-size: 0.7rem;
        gap: 3px;
    }

    .mobile-faq-toggle {
        min-width: 90px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-faq-toggle {
        min-width: 90px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .chat-input-area {
        padding: 10px 12px;
    }
    
    .message-input {
        padding: 8px 12px;
        min-height: 38px;
        font-size: 0.85rem;
    }
    
    .send-button {
        padding: 8px 16px;
        height: 38px;
        min-width: 55px;
        font-size: 0.85rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .chat-sidebar {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .agent-info {
        gap: 6px;
    }
    
    .agent-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .agent-info h4 {
        font-size: 0.8rem;
    }
    
    .agent-status {
        font-size: 0.65rem;
    }
    
    .mobile-faq-toggle {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .faq-toggle-text {
        display: none; /* 在超小屏幕上只显示图标 */
    }
    
    .mobile-faq-toggle {
        min-width: 40px;
        width: 40px;
        padding: 6px;
    }
}
