    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    }
    
    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        min-height: 100vh;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        height: 100vh;
        overflow-x: hidden;
        width: 100%;
    }
    
    .chat-container {
        width: 100%;
        max-width: 900px;
        background: white;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        height: 100vh;
        position: relative;
        overflow: hidden;
        margin: 0;
    }
    
    .header {
        background: linear-gradient(90deg, #1a2980 0%, #26d0ce 100%);
        color: white;
        padding: 25px;
        text-align: center;
        position: relative;
        flex-shrink: 0;
        z-index: 10;
    }
    
    .header h1 {
        font-size: 28px;
        margin-bottom: 10px;
        font-weight: 700;
    }
    
    .header p {
        font-size: 16px;
        opacity: 0.9;
    }
    
    .company-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin-top: 15px;
        font-size: 14px;
    }
    
    .info-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .chat-area {
        flex: 1;
        padding: 25px;
        overflow-y: auto;
        background: #f8f9fa;
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-bottom: 100px;
        position: relative;
        z-index: 1;
        -webkit-overflow-scrolling: touch; /* 平滑滚动 */
    }
    
    .message {
        max-width: 80%;
        padding: 18px;
        border-radius: 18px;
        line-height: 1.5;
        animation: fadeIn 0.3s ease;
        position: relative;
        z-index: 2;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .user-message {
        background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 5px;
    }
    
    .bot-message {
        background: white;
        border: 1px solid #e0e0e0;
        align-self: flex-start;
        border-bottom-left-radius: 5px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .message-header {
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .user-message .message-header {
        color: rgba(255,255,255,0.9);
    }
    
    .bot-message .message-header {
        color: #1a2980;
    }
    
    .input-area {
        padding: 20px;
        background: white;
        border-top: 1px solid #eaeaea;
        display: flex;
        gap: 15px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        width: 100%;
    }
    
    #questionInput {
        flex: 1;
        padding: 18px 20px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-size: 16px;
        transition: all 0.3s;
        outline: none;
        background: white;
        min-height: 56px;
        max-width: 100%;
    }
    
    #questionInput:focus {
        border-color: #4776E6;
        box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.1);
    }
    
    #sendButton {
        background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
        color: white;
        border: none;
        padding: 0 35px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s;
        white-space: nowrap;
        min-height: 56px;
        flex-shrink: 0;
    }
    
    #sendButton:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(71, 118, 230, 0.3);
    }
    
    #sendButton:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    
    .loading {
        display: none;
        text-align: center;
        padding: 15px;
        color: #666;
        position: fixed;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
        min-width: 200px;
    }
    
    .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #4776E6;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 10px;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    .welcome-message {
        text-align: center;
        padding: 30px;
        background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
        border-radius: 15px;
        margin-bottom: 20px;
        border: 2px dashed #c3cfe2;
    }
    
    .welcome-message h3 {
        color: #1a2980;
        margin-bottom: 15px;
        font-size: 22px;
    }
    
    .welcome-message p {
        margin-bottom: 15px;
        color: #555;
        line-height: 1.6;
    }
    
    .suggested-questions {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
        justify-content: center;
    }
    
    .suggestion {
        background: white;
        border: 1px solid #e0e0e0;
        padding: 12px 20px;
        border-radius: 25px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.2s;
        color: #333;
    }
    
    .suggestion:hover {
        background: #f0f5ff;
        border-color: #4776E6;
        transform: translateY(-2px);
    }
    
    .icon {
        font-size: 18px;
    }
    
    .error-message {
        background: #fff2f2;
        border: 1px solid #ffcdd2;
        color: #d32f2f;
        padding: 15px;
        border-radius: 10px;
        margin: 10px 0;
        max-width: 80%;
        align-self: center;
    }
    
    /* 桌面版样式 */
    @media (min-width: 769px) {
        body {
            padding: 20px;
            height: 100vh;
            overflow: auto;
        }
        
        .chat-container {
            height: 90vh;
            max-height: 800px;
            border-radius: 20px;
            margin: auto;
            position: relative;
            max-width: 900px;
            width: calc(100% - 40px);
        }
        
        .input-area {
            position: relative;
            bottom: auto;
            left: auto;
            right: auto;
            padding: 25px;
            border-top: 1px solid #eaeaea;
            box-shadow: none;
            background: white;
            border-bottom-left-radius: 20px;
            border-bottom-right-radius: 20px;
            width: 100%;
        }
        
        .chat-area {
            padding-bottom: 25px;
        }
        
        .loading {
            position: relative;
            bottom: auto;
            left: auto;
            transform: none;
            background: transparent;
            box-shadow: none;
            min-width: auto;
        }
    }
    
    /* 移动端响应式设计 */
    @media (max-width: 768px) {
        body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100vh;
            overflow: hidden;
        }
        
        .chat-container {
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
            width: 100%;
            max-width: 100%;
            margin: 0;
            box-shadow: none;
        }
        
        .header {
            padding: 20px 15px;
            width: 100%;
        }
        
        .header h1 {
            font-size: 22px;
            word-wrap: break-word;
        }
        
        .company-info {
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }
        
        .chat-area {
            padding: 20px 15px;
            padding-bottom: 90px;
            width: 100%;
            overflow-y: auto;
        }
        
        .input-area {
            padding: 15px;
            flex-direction: row;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            border-top: 1px solid #ddd;
            width: 100%;
            box-sizing: border-box;
        }
        
        #sendButton {
            width: auto;
            padding: 0 25px;
            min-height: 52px;
            flex-shrink: 0;
        }
        
        #questionInput {
            min-height: 52px;
            padding: 15px;
            font-size: 16px;
            width: 100%;
            max-width: calc(100% - 110px);
        }
        
        .message {
            max-width: 90%;
            padding: 15px;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        
        .welcome-message {
            padding: 20px 15px;
            margin-top: 10px;
            width: 100%;
            box-sizing: border-box;
        }
        
        .welcome-message h3 {
            font-size: 20px;
        }
        
        .suggested-questions {
            flex-direction: column;
            align-items: center;
            width: 100%;
        }
        
        .suggestion {
            width: 100%;
            max-width: 300px;
            text-align: center;
            box-sizing: border-box;
        }
        
        .loading {
            bottom: 75px;
            left: 50%;
            transform: translateX(-50%);
            min-width: 180px;
            padding: 12px;
            font-size: 14px;
        }
        
        .loading-spinner {
            width: 18px;
            height: 18px;
        }
    }
    
    @media (max-width: 480px) {
        body {
            width: 100%;
            overflow-x: hidden;
        }
        
        .chat-container {
            width: 100vw;
            max-width: 100vw;
        }
        
        .chat-area {
            padding-bottom: 85px;
            width: 100%;
        }
        
        .input-area {
            padding: 12px 15px;
            gap: 10px;
            width: 100vw;
        }
        
        #questionInput {
            padding: 12px 15px;
            font-size: 16px;
            min-height: 48px;
            max-width: calc(100vw - 130px);
        }
        
        #sendButton {
            padding: 0 20px;
            font-size: 15px;
            min-height: 48px;
            width: auto;
        }
        
        .message {
            max-width: 95%;
            padding: 12px 15px;
        }
        
        .message-header {
            font-size: 14px;
        }
        
        .loading {
            bottom: 70px;
            min-width: 160px;
            font-size: 13px;
        }
        
        .header h1 {
            font-size: 20px;
            line-height: 1.3;
        }
        
        .header p {
            font-size: 14px;
            line-height: 1.4;
        }
        
        .welcome-message h3 {
            font-size: 18px;
        }
        
        .welcome-message p {
            font-size: 14px;
        }
        
        .suggestion {
            font-size: 13px;
            padding: 10px 15px;
        }
    }
    
    @media (max-width: 360px) {
        #questionInput {
            font-size: 14px;
            padding: 10px 12px;
        }
        
        #sendButton {
            padding: 0 15px;
            font-size: 14px;
        }
        
        .header {
            padding: 15px 10px;
        }
        
        .header h1 {
            font-size: 18px;
        }
        
        .header p {
            font-size: 13px;
        }
    }
    
    /* 针对键盘弹出的优化 */
    @media (max-height: 500px) {
        .chat-area {
            padding-bottom: 80px;
        }
        
        .header {
            padding: 15px;
        }
        
        .header h1 {
            font-size: 18px;
            margin-bottom: 5px;
        }
        
        .header p {
            font-size: 13px;
        }
        
        .welcome-message {
            padding: 15px;
            margin-bottom: 10px;
        }
        
        .message {
            padding: 12px;
            margin-bottom: 10px;
        }
        
        .input-area {
            padding: 10px 15px;
        }
    }
    
    /* 防止输入框被键盘遮挡的iOS特定优化 */
    @supports (-webkit-touch-callout: none) {
        .input-area {
            padding-bottom: max(15px, env(safe-area-inset-bottom));
        }
        
        .chat-area {
            padding-bottom: calc(100px + env(safe-area-inset-bottom));
        }
        
        body {
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
        
        .header {
            padding-top: calc(25px + env(safe-area-inset-top));
        }
    }
    
    /* 修复安卓设备上的滚动问题 */
    .chat-area::-webkit-scrollbar {
        width: 6px;
    }
    
    .chat-area::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .chat-area::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    .chat-area::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }