* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}



.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    color: #1a73e8;
    font-size: 24px;
    text-align: center;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.carousel-indicator.active {
    background-color: white;
}



.select-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.page-logo {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 30 auto 10px;
}
select {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.question-container {
    display: none;
    margin-top: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

/* AI页面样式美化 */
.model-output-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.question-input-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s;
}

.question-input-container textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.question-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.back-btn {
    padding: 8px 16px;
    background-color: #f1f3f4;
    border: none;
    border-radius: 4px;
    color: #1a73e8;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #e8f0fe;
}

.favorite-btn {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 4px;
    color: #ff9800;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: all 0.2s;
}

.favorite-btn:hover {
    background-color: #fff3e0;
}

.video-container {
    margin: 20px 0;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;

}

.video-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.contact-info {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    color: #666;
}

.no-selection {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.favorites-list {
    max-height: 400px;
    overflow-y: auto;
}

.favorite-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.favorite-item:hover {
    background-color: #e8f0fe;
}

.favorite-item-title {
    font-weight: bold;
}

.remove-favorite {
    color: #f44336;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

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

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .carousel-container {
        height: 200px;
    }
    
    .favorite-btn, .back-btn, .history-btn {
    padding: 10px 16px;
    font-size: 16px;
    min-width: 120px;
}
    
    .select-container {
        gap: 10px;
    }
    
    select, #question-search {
        padding: 12px;
        font-size: 16px;
    }
    
    .question-title {
        font-size: 18px;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 15px;
    }
    
    .form-group input, .form-group select, .form-group textarea {
        padding: 12px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 14px 0;
        font-size: 16px;
    }
    
    .feedback-section {
        padding: 15px;
        margin-top: 30px;
    }
}

/* 用户留言框样式 */
.feedback-section {
    margin-top: 50px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.feedback-section h2 {
    color: #1a73e8;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.submit-btn {
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    display: block;
    width: 100%;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #0d61d4;
}

/* 历史留言样式 */
#feedback-list h3 {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    color: #343a40;
}

.feedback-items {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* 新增的历史留言样式 */
.feedback-item {
    margin: 15px 0;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.feedback-media {
    margin-top: 10px;
}

.feedback-media img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

.feedback-media video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.feedback-username {
    font-weight: bold;
    color: #333;
}

.feedback-product {
    color: #666;
    margin: 0 10px;
}

.feedback-time {
    color: #999;
}

.feedback-content {
    line-height: 1.6;
    color: #444;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.no-feedback {
    text-align: center;
    color: #666;
    padding: 30px;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f1f3f4;
    color: #1a73e8;
}

#question-search {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f1f3f4;
}

.search-result-item.active {
    background-color: #e8f0fe;
    color: #1a73e8;
}

.media-container {
    margin: 20px 0;
    text-align: center;

}

.question-media {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}



/* AI按钮样式 */
.ai-button-container {
    text-align: center;
    margin: 20px 0;
}

.ai-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.ai-button:hover {
    background-color: #45a049;
}

/* AI问答页面样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

.ai-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.model-output-container {
    width: 100%;
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
    margin-bottom: 30px;
}


.model-output {
    color: #666;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

.query-container {
    width: 100%;
}

.question-input-container {
    position: relative;
    margin-bottom: 15px;
}

#question-input {
    width: 100%;
    height: 120px;
    padding: 15px;
    padding-right: 100px; /* 为发送按钮留出空间 */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: none;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}



#media-upload {
    width: 100%;
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
    margin-top: 10px;
    cursor: pointer;
}

/* 基础样式 */
/* 问答容器样式 */
.qa-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

/* 问答项样式 */
.qa-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 问题样式 */
.question {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

/* 回答样式 */
.answer {
    color: #666;
    line-height: 1.6;
}

/* 时间戳样式 */
.timestamp {
    margin-top: 8px;
    font-size: 0.8em;
    color: #999;
    text-align: right;
}

/* 媒体内容样式 */
.answer img, .answer video {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-top: 10px;
    border-radius: 4px;
}

/* 加载状态样式 */
.loading-item {
    padding: 15px;
    color: #666;
}

.loading {
    color: #666;
    font-style: italic;
}

/* 错误状态样式 */
.error {
    color: #ff4d4f;
    margin-top: 8px;
}

/* AI问答页面样式 */
.ai-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ai-back-btn {
    display: inline-block;
}

.ai-title {
    text-align: center;

}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    margin-bottom: 50px;
}

.model-output-container {
    width: 100%;
    height: calc(100vh - 400px);
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 30px;
    background-color: #fff;
}

.history-btn {
    padding: 8px 16px;
    background-color: #f1f3f4;
    border: none;
    border-radius: 4px;
    color: #1a73e8;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.history-btn:hover {
    background-color: #e8f0fe;
}

.model-output {
    color: #666;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

.query-container {
    width: 100%;
}

.question-input-container {
    position: relative;
    margin-bottom: 15px;
}

#question-input {
    width: 100%;
    height: 120px;
    padding: 15px;
    padding-right: 100px; /* 为发送按钮留出空间 */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    resize: none;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

#media-upload {
    flex: 1;
    padding: 12px;
    border: 1px dashed #ccc;
    border-radius: 20px;
    background-color: #f9f9f9;
    text-align: center;
    cursor: pointer;
}

.send-btn {
    width: 100px;
    padding: 12px 0;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.send-btn:hover {
    background-color: #0d61d4;
}



/* 基础样式 */
/* 历史问答模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: black;
}

.history-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.history-question {
    margin-bottom: 8px;
    font-size: 15px;
}

.history-answer {
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.history-time {
    color: #888;
    font-size: 12px;
    text-align: right;
}