* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}  
body {
    font-family: Source Han Sans CN, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #ffffff;
    overflow: hidden;
}
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    border: 1px solid #EFF0F1;
    transition: transform 0.3s ease;
    position: relative;
    flex-shrink: 0;
    transform: translateX(0);
}

.sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-collapsed-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-collapsed-container.show {
    opacity: 1;
    pointer-events: auto;
}

.collapsed-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.collapsed-actions-container {
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 100px;
    align-items: center;
    gap: 2px;
    height: 40px;
    margin-left: 8px;
    padding: 0 6px;
    display: flex;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .04);
}

.collapsed-action-btn {
    width: 34px;
    height: 34px;
    position: relative;
    z-index: 0;
    background-color: transparent;
    border-radius: 50%;
    transition: background-color .2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapsed-action-btn:hover {
    background-color: #f0f0f0;
}

.collapsed-action-btn img {
    width: 18px;
    height: 18px;
}

.collapsed-action-btn .tooltip {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.collapsed-action-btn .tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1f2937;
}

.collapsed-action-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}


.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 14px 22px 16px;
    min-width: 258px;
    white-space: nowrap;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.xiaoba-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: bold;
    font-size: 16px;
    color: #3964FE;
    line-height: 33px;
    white-space: nowrap;
    overflow: hidden;
}

.header-actions {
    display: flex;
    gap: 4px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    position: relative;
}

.icon-btn:hover {
    background-color: #e5e7eb;
}

.icon-btn img {
    width: 20px;
    height: 20px;
}

.icon-btn .tooltip {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.icon-btn .tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1f2937;
}

.icon-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.new-chat-btn {
    margin: 0 12px 20px;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    transition: all 0.2s;
    box-shadow: 0 -2px 2px rgba(72, 104, 178, .04), 0 2px 2px rgba(106, 111, 117, .09), 0 1px 2px rgba(72, 104, 178, .08);
    width: 236px;
    flex-shrink: 0;
}

.new-chat-btn:hover {
    box-shadow: 0 4px 4px rgba(72, 104, 178, .04), 0 -3px 4px rgba(72, 104, 178, .04), 0 6px 6px rgba(106, 111, 117, .1);
}

.new-chat-btn img {
    width: 20px;
    height: 20px;
}

.history-section {
    flex: 1;
    overflow-y: hidden;
    padding: 0 12px;
    position: relative;
}

.history-section:hover {
    overflow-y: auto;
}

.history-section::-webkit-scrollbar {
    width: 6px;
}

.history-section::-webkit-scrollbar-track {
    background: transparent;
}

.history-section::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 3px;
}

.history-section::-webkit-scrollbar-thumb:hover {
    background-color: #d1d5db;
}

.history-section::after {
    content: '';
    position: fixed;
    bottom: 52px;
    left: 0;
    width: 260px;
    height: 60px;
    background: linear-gradient(to bottom, transparent 0%, #F9FAFB 70%, #F9FAFB 100%);
    pointer-events: none;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s;
}

.history-section.scroll-at-bottom::after {
    opacity: 0;
}

.history-title {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    margin: 16px 8px 8px;
}

.history-list {
    list-style: none;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

.history-item:hover {
    background: #E4EDFD;
    border-radius: 8px;
}

.history-item:hover .history-text {
    color: #3964FE;
}

.history-item.active {
    background-color: #dbeafe;
}

.history-item.active .history-text {
    color: #2563eb;
    font-weight: 500;
}

.history-text {
    flex: 1;
    font-weight: 400;
    font-size: 14px;
    color: #000000;
    line-height: 39px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.history-item:hover .delete-btn,
.history-item.active .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    box-shadow: 0 1px 4px rgba(57, 100, 254, 0.12);
    background-color: rgba(57, 100, 254, 0.08);
}

.delete-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    position: relative;
}

/* 未登录时隐藏菜单相关元素 */
.not-logged-in .menu-btn,
.not-logged-in .user-menu {
    display: none !important;
}

.not-logged-in .user-info {
    cursor: default;
}

.not-logged-in .user-info:hover {
    background-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.user-info:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.menu-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.menu-btn:hover {
    box-shadow: 0 0 0 6px rgba(57, 100, 254, 0.1);
    background-color: rgba(57, 100, 254, 0.08);
}

.menu-btn svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.user-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 8px 0;
    z-index: 100;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
}

.user-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.user-menu-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #6b7280;
}

.user-menu-item:hover {
    background-color: #f3f4f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.main-header {
    padding: 16px 32px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.nav-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.08);
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.welcome-section h1 {
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    line-height: 66px;
    margin-bottom: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.input-section {
    width: 100%;
}

.welcome-input-section {
    max-width: 700px;
}

.input-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#messageInput {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1f2937;
    resize: none;
    font-family: inherit;
    overflow-y: hidden;
}

#messageInput::-webkit-scrollbar {
    width: 6px;
}

#messageInput::-webkit-scrollbar-track {
    background: transparent;
}

#messageInput::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 3px;
}

#messageInput::-webkit-scrollbar-thumb:hover {
    background-color: #d1d5db;
}

#messageInput::placeholder {
    font-size: 16px;
    color: #AFB4BA;
}

.file-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 200px;
    max-width: 280px;
    gap: 12px;
    position: relative;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.file-name {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: #6b7280;
}

.file-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.file-remove:hover {
    background: #e5e7eb;
    color: #374151;
}


.input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.custom-select {
    position: relative;
    display: inline-block;
}

.select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background-color: #ffffff;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.select-trigger:hover {
    border-color: #d1d5db;
}

.select-arrow {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.select-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.custom-select.open .select-dropdown {
    display: block;
}

.select-option {
    padding: 12px 16px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}

.select-option:hover {
    background: #f9fafb;
}

.select-option.selected {
    background: #f3f4f6;
}

.select-option .check-icon {
    width: 18px;
    height: 18px;
    color: #374151;
    opacity: 0;
    transition: opacity 0.2s;
}

.select-option.selected .check-icon {
    opacity: 1;
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-actions .icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#attachBtn svg {
    width: 20px;
    height: 20px;
}

#sendBtn svg {
    width: 16px;
    height: 16px;
}

#sendBtn {
    background-color: #afc1ff;
    border-radius: 50%;
    cursor: not-allowed;
}

#sendBtn.has-content {
    background-color: #2563eb;
    cursor: pointer;
}

#sendBtn svg {
    color: white;
}

#sendBtn.has-content svg {
    color: white;
}

/* 设置弹窗 */
.settings-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, .5);
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: auto;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.settings-modal-overlay.show {
    display: flex;
}

.settings-modal {
    background: white;
    border-radius: 16px;
    width: 800px;
    max-width: 90vw;
    height: 80vh;
    /* max-height: 90vh; */
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin: 16px 0;
    overflow: hidden;
}

.settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.settings-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.settings-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.settings-modal-close:hover {
    background: #f3f4f6;
}

.settings-modal-close svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.settings-modal-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.settings-sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 12px 8px;
    flex-shrink: 0;
}

.settings-menu-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #0f1115;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 8px;
    margin: 2px 0;
    display: flex;
    align-items: center;
    font-weight: 400;
    gap: 10px;
}

.menu-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #0f1115;
}

.settings-menu-item:hover {
    background: rgba(38, 49, 72, .06);
}

.settings-menu-item.active {
    background: rgba(38, 49, 72, .06);
}

.settings-panel {
    flex: 1;
    padding: 13px 15px 25px;
    overflow-y: auto;
}

.settings-panel-content {
    display: none;
}

.settings-panel-content.active {
    display: block;
}

.settings-panel-content h4 {
    margin: 0px 0 8px 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.settings-panel-content p {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* 购买页面样式 */
.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 18px;
}

.purchase-header-left {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.purchase-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.product-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
}

.product-link:hover {
    text-decoration: underline;
}

.purchase-button {
    padding: 10px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.purchase-button:hover {
    background: #1d4ed8;
}

.promotion-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
}

.promotion-content p {
    margin: 8px 0;
    color: #4b5563;
    line-height: 1.8;
}

.promotion-content p:first-child {
    margin-top: 0;
}

.promotion-content p:last-child {
    margin-bottom: 0;
}

.risk-warning {
    background: #fef3f3;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #fecaca;
}

.risk-warning p {
    color: #991b1b;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* 购买弹窗样式 */
.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.purchase-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.purchase-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.purchase-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.customer-service-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.customer-service-btn:hover {
    background: #f3f4f6;
}

.service-icon {
    width: 24px;
    height: 24px;
    color: #4b5563;
}

.purchase-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.subscription-info {
    margin-bottom: 24px;
}

.subscription-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.subscription-name {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.price-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.price-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.price-option:hover {
    border-color: #d1d5db;
}

.price-option.selected {
    border-color: #fd382c;
    background: rgba(253, 56, 44, 0.05);
}

.radio-button {
    margin-right: 12px;
}

.radio-circle {
    width: 15px;
    height: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.price-option.selected .radio-circle {
    border-color: #fd382c;
    background: #fd382c;
}

.price-option.selected .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 6px;
    height: 3px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
}

.option-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-title {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.option-badge {
    height: 16px;
}

.option-price {
    text-align: right;
}

.current-price {
    display: block;
    font-size: 26px;
    color: #fd382c;
    font-weight: 700;
}

.original-price {
    display: block;
    font-size: 12px;
    color: rgba(102, 102, 102, 1);
    text-decoration: line-through;
}

.invite-code-section {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.invite-label {
    font-size: 14px;
    color: #4b5563;
    margin-right: 12px;
}

.invite-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.invite-input:focus {
    border-color: #3b82f6;
}

.agreement-section {
    margin-bottom: 24px;
}

.agreement-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
}

.agreement-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.8;
    margin: 0 0 12px 0;
}

.agreement-checkbox {
    font-size: 14px;
    color: #4b5563;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

.agreement-checkbox input {
    margin-top: 3px;
}

.agreement-link {
    color: rgba(229, 34, 34, 1);
    text-decoration: none;
}

.agreement-link:hover {
    text-decoration: underline;
}

.purchase-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.total-price {
    display: flex;
    align-items: baseline;
}

.price-label {
    font-size: 14px;
    color: #333333;
    margin-right: 4px;
}

.price-value {
    font-size: 22px;
    color: #e52222;
    font-weight: 700;
    margin-right: 15px;
}

.discount-info {
    font-size: 14px;
    color: #333333;
}

.pay-button {
      padding: 14px 17px;
    background: linear-gradient(90deg, rgba(252, 68, 49, 1), rgba(234, 45, 59, 1));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s;
}

.pay-button:hover {
    opacity: 0.9;
}

.payment-qr-section {
    padding: 40px 0;
}

.qr-container {
    text-align: center;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
}

.qr-placeholder p {
    color: #6b7280;
    margin: 0;
}

.cancel-payment-btn {
    padding: 10px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.cancel-payment-btn:hover {
    background: #e5e7eb;
}

/* 自定义提示框 */
.custom-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 40px;
    border-radius: 12px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.custom-toast.show {
    color: #ffffff;
    opacity: 1;
    visibility: visible;
}

.toast-content {
    color: white;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
}

/* 系统设置页面样式 */
.settings-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 24px 0;
}

.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 12px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.settings-item:hover {
    background: #f9fafb;
}

.settings-item-label {
    font-size: 15px;
    color: #111827;
}

.settings-item-danger {
    color: #ef4444;
}

.settings-item-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item-text {
    font-size: 14px;
    color: #6b7280;
}

.settings-item-arrow {
    color: #9ca3af;
    flex-shrink: 0;
}

.settings-avatar-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* 系统弹窗样式 */
.system-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.system-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.system-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 388px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.system-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.system-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-modal-close:hover {
    background: #f3f4f6;
}

.system-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.delete-confirm-text {
    text-align: center;
    font-size: 15px;
    color: #1f2937;
    line-height: 1.6;
    margin: 0;
}

.delete-confirm-modal .system-modal-content {
    padding: 20px 24px 20px;
    text-align: center;
}

.delete-confirm-title {
    font-size: 16px;
    font-weight: 600;
    color: #0F1115;
    margin: 0 0 16px 0;
    text-align: left;
}

.delete-confirm-subtitle {
    font-size: 14px;
    color: #61666B;
    margin: 0;
    text-align: left;
}

.delete-confirm-modal .system-modal-footer {
    padding: 0 24px 24px;
    border-top: none;
    justify-content: flex-end;
    gap: 12px;
}

.delete-confirm-modal .system-modal-btn {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    background: #F2F3F5;
    color: #0F1115;
}

.system-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.system-modal-input:last-child {
    margin-bottom: 0;
}

.system-modal-input:focus {
    border-color: #3b82f6;
}

.system-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.system-modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    background: #f3f4f6;
    color: #1f2937;
}

.system-modal-btn:hover {
    background: #e5e7eb;
}

.system-modal-btn.primary {
    background: linear-gradient(90deg, #fc4431, #ea2d3b);
    color: white;
}

.system-modal-btn.primary:hover:not(:disabled) {
    opacity: 0.9;
}

.system-modal-btn.danger {
    background: #ef4444;
    color: white;
}

.system-modal-btn.danger:hover:not(:disabled) {
    background: #dc2626;
}

.system-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 头像上传样式 */


/* 推送管理样式 */
.push-settings-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.push-settings-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.push-header-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.push-settings-list {
    display: flex;
    flex-direction: column;
}

.push-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.push-setting-item:hover {
    background-color: #f9fafb;
}

.select-setting-item {
    border-bottom: none;
    padding-top: 16px;
}

.push-setting-label {
    font-size: 15px;
    color: #1f2937;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-label {
    background-color: #3b82f6;
}

.toggle-input:checked + .toggle-label:before {
    transform: translateX(18px);
}

/* 下拉选择框样式 */
.push-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background-color: white;
    cursor: pointer;
    outline: none;
    min-width: 100px;
    transition: border-color 0.2s;
}

.push-select:hover {
    border-color: #9ca3af;
}

.push-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 我的订单样式 */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.order-time {
    font-size: 14px;
    color: #6b7280;
}

.order-number {
    font-size: 14px;
    color: #6b7280;
}

.order-details {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.order-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.order-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-title {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

.order-validity {
    font-size: 13px;
    color: #6b7280;
}

.order-price {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

.order-status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.order-status-text {
    font-size: 14px;
    color: #6b7280;
}

.order-total-price {
    font-size: 14px;
    color: #1f2937;
}

.price-highlight {
    color: rgba(252, 68, 49, 1);
    font-weight: 600;
}

.order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-status-left {
    font-size: 14px;
    color: #6b7280;
}

.order-buttons {
    display: flex;
    gap: 8px;
}

.order-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.order-btn.secondary {
    background-color: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.order-btn.secondary:hover {
    background-color: #eff6ff;
}

.order-btn.primary {
    background-color: rgba(252, 68, 49, 1);
    color: white;
}

.order-btn.primary:hover {
    background-color: #e03e31;
}

.order-footer-note {
    margin-top: 20px;
    padding: 12px 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.contact-customer-service-link {
    color: rgba(252, 68, 49, 1);
    text-decoration: none;
    cursor: pointer;
}

.contact-customer-service-link:hover {
    text-decoration: underline;
}

/* 加入会员群样式 */
.group-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.group-content {
    max-width: 400px;
    width: 100%;
}

.kf-image-wrapper {
    position: relative;
    width: 100%;
}

.kf-image {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.contact-kf-btn {
    position: absolute;
    bottom: 92px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.contact-kf-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

.contact-kf-btn img {
    display: block;
    max-width: 200px;
    width: 100%;
}

/* 客服二维码弹窗样式 */
.qrcode-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.qrcode-modal-overlay.show {
    display: flex;
}

.qrcode-modal {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.qrcode-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6b7280;
    transition: all 0.2s;
}

.qrcode-modal-close:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.qrcode-modal-close svg {
    width: 20px;
    height: 20px;
}

.qrcode-modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
}

.qrcode-image {
    max-width: 300px;
    width: 100%;
    display: block;
}

/* 联系我们样式 */
.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.service-image {
    width: 100%;
    max-width: 400px;
    display: block;
    margin-bottom: 32px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.contact-btn:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-btn-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    color: #3b82f6;
}

.contact-btn-icon svg {
    width: 32px;
    height: 32px;
}

.contact-btn-icon.wechat-icon {
    color: #07c160;
}

.contact-btn-content {
    flex: 1;
}

.contact-btn-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.contact-btn-desc {
    font-size: 14px;
    color: #6b7280;
}

.contact-hours {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

/* 微信客服二维码弹窗样式 */
.wechat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.wechat-modal-overlay.show {
    display: flex;
}

.wechat-modal {
    background-color: white;
    border-radius: 16px;
    padding: 32px 24px 24px;
    max-width: 360px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

.wechat-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6b7280;
    transition: all 0.2s;
}

.wechat-modal-close:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.wechat-modal-close svg {
    width: 20px;
    height: 20px;
}

.wechat-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wechat-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
}

.wechat-qrcode-image {
    max-width: 250px;
    width: 100%;
    display: block;
    margin-bottom: 16px;
    border-radius: 8px;
}

.wechat-modal-desc {
    font-size: 14px;
    color: #6b7280;
}

#sendBtn:hover.has-content {
    background-color: #1d4ed8;
}

/* 欢迎界面样式 */
.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    transition: opacity 0.3s ease;
}

.conversation-section {
        flex: 1;
    padding: 0;
    position: relative;
  /*  overflow-y: auto;*/
}

.welcome-section h1 {
    font-size: 36px;
    color: #000000;
    margin-bottom: 40px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.welcome-content.hidden {
    display: none;
}

/* 对话区域样式 */
.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
   /* overflow: hidden;*/
}
.conversation-section-content{
height: 100%;
    display: flex;
    flex-direction: column;
}
.messages-container {
    width: 752px;
    margin: 0 auto;
    flex: 1;
    padding: 24px;
   /* overflow-y:auto;*/
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 消息样式 */
.message-item {
    display: flex;
    margin-bottom: 24px;
    gap: 12px;
}

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

.ai-message {
    flex-direction: row;
}

.message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.message-content {
    width: calc(100% - 88px);
}

.user-message .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-message .message-text {
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    border-radius: 22px;
    max-width: 70%;
    padding: 10px 16px;
    font-size: 16px;
    line-height: 24px;
    transition: background .3s;
    position: relative;
    color: #000000;
    background: #edf3fe;
    word-break: normal;
}

.ai-message .message-text {
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    line-height: 33px;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.thinking-icon {
    width: 15px;
    height: 15px;
    margin-right: 8px;
}

.thinking-loading {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    color: #61666B;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.thinking-status {
    font-size: 16px;
    color: #61666B;
    line-height: 33px;
    margin-right: 12px;
}

.toggle-thinking-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.toggle-thinking-btn:hover {
    background: #f3f4f6;
}

/*.toggle-thinking-btn svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}*/
    .toggle-thinking-btn svg {
        width: 16px;
        height: 16px;
        color: #9ca3af;
        transition: transform 0.2s;
    }

    .toggle-thinking-btn.open svg {
        transform: rotate(180deg);
    }

.thinking-content {
    padding: 0 0 12px 24px;
    position: relative;
}

.thinking-content::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #81858C;
}

.thinking-content::after {
    content: '';
    position: absolute;
    left: 7.5px;
    top: 0;
    width: 5px;
    height: 5px;
    background: #81858C;
    border-radius: 50%;
}

.thinking-content .bottom-dot {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 5px;
    height: 5px;
    background: #81858C;
    border-radius: 50%;
}

.thinking-text-content {
    font-size: 16px;
    color: #61666B;
    line-height: 33px;
}

.read-webpages-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #61666b;
    font-size: 14px;
    cursor: pointer;
    margin: 8px 0 12px 0;
    transition: background 0.2s;
}

.read-webpages-btn:hover {
    background: #e6f0ff;
}

.read-webpages-btn .search-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.message-body {
    display: flex;
    flex-direction: column;
}

.references-btn {
    display: flex;
    align-items: center;
    height: 33px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #777C80;
    padding: 0 15px;
    margin-top: 12px;
    cursor: pointer;
    width: fit-content;
}

.references-btn:hover {
    background: #f9fafb;
}

.references-icon {
    width: 20px;
    height: 15px;
    margin-right: 8px;
}

.references-btn-text {
    font-size: 16px;
    color: #0F1115;
    margin-right: 5px;
}

.references-arrow {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    color: #61666b;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.action-btn:hover {
    background: #f3f4f6;
}

.action-btn img {
    width: 18px;
    height: 18px;
}

.action-btn .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.action-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.bottom-input {
    padding: 16px 24px;
    background: white;
    margin: 0 auto;
    flex-shrink: 0;
}

.bottom-input .input-section {
    width: 100%;
    max-width: 100%;
}

.bottom-input .input-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.bottom-input #messageInputBottom {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1f2937;
    resize: none;
    font-family: inherit;
    overflow-y: hidden;
    min-height: 40px;
}

.bottom-input #messageInputBottom::-webkit-scrollbar {
    width: 6px;
}

.bottom-input #messageInputBottom::-webkit-scrollbar-track {
    background: transparent;
}

.bottom-input #messageInputBottom::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 3px;
}

.bottom-input #messageInputBottom::-webkit-scrollbar-thumb:hover {
    background-color: #d1d5db;
}

.bottom-input #messageInputBottom::placeholder {
    font-size: 16px;
    color: #AFB4BA;
}

.bottom-input .file-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bottom-input .input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bottom-input .custom-select {
    position: relative;
    display: inline-block;
}

.bottom-input .select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background-color: #ffffff;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.bottom-input .select-trigger:hover {
    border-color: #d1d5db;
}

.bottom-input .select-arrow {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.bottom-input .select-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.bottom-input .custom-select.open .select-dropdown {
    display: block;
}

.bottom-input .select-option {
    padding: 12px 16px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}

.bottom-input .select-option:hover {
    background: #f9fafb;
}

.bottom-input .select-option.selected {
    background: #f3f4f6;
}

.bottom-input .select-option .check-icon {
    width: 18px;
    height: 18px;
    color: #374151;
    opacity: 0;
    transition: opacity 0.2s;
}

.bottom-input .select-option.selected .check-icon {
    opacity: 1;
}

.bottom-input .right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-input .icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    position: relative;
}

.bottom-input .icon-btn:hover {
    background-color: #e5e7eb;
}

.bottom-input .icon-btn img {
    width: 20px;
    height: 20px;
}

.bottom-input .icon-btn .tooltip {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.bottom-input .icon-btn .tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1f2937;
}

.bottom-input .icon-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.bottom-input #attachBtnBottom svg {
    width: 20px;
    height: 20px;
}

.bottom-input #sendBtnBottom {
    background-color: #afc1ff;
    border-radius: 50%;
    cursor: not-allowed;
}

.bottom-input #sendBtnBottom.has-content {
    background-color: #2563eb;
    cursor: pointer;
}

.bottom-input #sendBtnBottom svg {
    color: white;
}

/* 欢迎界面的输入区域 */
.input-section {
    width: 100%;
    max-width: 752px;
    position: sticky;
    bottom: 0;
}

.welcome-input-section {
    max-width: 700px;
}

.input-box {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#messageInput {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1f2937;
    resize: none;
    font-family: inherit;
    overflow-y: hidden;
}

#messageInput::-webkit-scrollbar {
    width: 6px;
}

#messageInput::-webkit-scrollbar-track {
    background: transparent;
}

#messageInput::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 3px;
}

#messageInput::-webkit-scrollbar-thumb:hover {
    background-color: #d1d5db;
}

#messageInput::placeholder {
    font-size: 16px;
    color: #AFB4BA;
}

.file-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select {
    position: relative;
    display: inline-block;
}

.select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background-color: #ffffff;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.select-trigger:hover {
    border-color: #d1d5db;
}

.select-arrow {
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.select-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.custom-select.open .select-dropdown {
    display: block;
}

.select-option {
    padding: 12px 16px;
    font-size: 14px;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s;
}

.select-option:hover {
    background: #f9fafb;
}

.select-option.selected {
    background: #f3f4f6;
}

.select-option .check-icon {
    width: 18px;
    height: 18px;
    color: #374151;
    opacity: 0;
    transition: opacity 0.2s;
}

.select-option.selected .check-icon {
    opacity: 1;
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    position: relative;
}

.icon-btn:hover {
    background-color: #e5e7eb;
}

.icon-btn img {
    width: 20px;
    height: 20px;
}

.icon-btn .tooltip {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: #1f2937;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.icon-btn .tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #1f2937;
}

.icon-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

#attachBtn svg {
    width: 20px;
    height: 20px;
}

#sendBtn {
    background-color: #afc1ff;
    border-radius: 50%;
    cursor: not-allowed;
}

#sendBtn.has-content {
    background-color: #2563eb;
    cursor: pointer;
}

#sendBtn svg {
    color: white;
}

.file-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 200px;
    max-width: 280px;
    gap: 12px;
    position: relative;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bottom-input .file-info {
    flex: 1;
    overflow: hidden;
}

.bottom-input .file-name {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.bottom-input .file-meta {
    font-size: 12px;
    color: #6b7280;
}

.bottom-input .file-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
}

.bottom-input .file-remove:hover {
    background: #e5e7eb;
    color: #374151;
}

/* 用户消息样式 */
.message-user {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.message-user-content {
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 22px;
    max-width: calc(100% - 88px);
    padding: 10px 16px;
    font-size: 16px;
    line-height: 24px;
    transition: background 0.3s;
    position: relative;
    color: #000000;
    background: #edf3fe;
}

/* AI回复样式 */
.message-ai {
    display: flex;
    margin-bottom: 24px;
}

.message-ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-ai-content {
    flex: 1;
    max-width: calc(100% - 88px);
}

.message-ai-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.thinking-icon {
    width: 15px;
    height: 15px;
    margin-right: 8px;
}

.thinking-text {
    font-size: 16px;
    color: #61666B;
    line-height: 33px;
}

.toggle-thinking-btn {
    margin-left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-thinking-btn svg {
    width: 16px;
    height: 16px;
    color: #61666B;
    transition: transform 0.2s;
}

.thinking-content {
    margin-bottom: 16px;
    padding: 10px 0 10px 22px;
    position: relative;
}

.thinking-content::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #81858C;
    margin: 10px 0;
}

.thinking-content::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 5px;
    background: #81858C;
    border-radius: 50%;
}

.thinking-dot-bottom {
    position: absolute;
    left: 0;
    bottom:0px;
    width: 5px;
    height: 5px;
    background: #81858C;
    border-radius: 50%;
}

.thinking-text-content {
    max-width: 85%;
    font-size: 16px;
    color: #61666B;
    line-height: 33px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-ai-body {
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    line-height: 33px;
    margin-bottom: 16px;
}

/* 引用按钮样式 */
.references-btn {
    display: inline-flex;
    align-items: center;
    width: 131px;
    height: 33px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #61666b;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.references-btn:hover {
    background: #f9fafb;
}

.references-btn-icon {
    width: 20px;
    height: 15px;
    margin-right: 15px;
    flex-shrink: 0;
}

.references-btn-text {
    font-size: 14px;
    color: #61666b;
    margin-right: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.references-btn-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* 操作按钮样式 */
.message-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.action-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.action-btn .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.action-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* 引用面板样式 */
.references-panel {
    width: 325px;
    height: 100%;
    background: white;
    border-left: 1px solid #e5e7eb;
    flex-shrink: 0;
    overflow: hidden;
    transform: translateX(100%);
    margin-right: -325px;
}

.references-panel.open {
    transform: translateX(0);
    margin-right: 0;
}

.references-panel.closing {
    transition: transform 0.3s ease, margin 0.3s ease;
}

.references-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:20px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.references-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.references-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.references-close:hover {
    background: #e5e7eb;
}

.references-close svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.references-list {
    padding: 16px 12px;
    overflow-y: auto;
    height: calc(100% - 73px);
}

.references-list::-webkit-scrollbar {
    width: 6px;
}

.references-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.references-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.reference-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.reference-item:last-child {
    border-bottom: none;
}

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

.reference-title {
    font-weight: 500;
    font-size: 16px;
    color: #0F1115;
    line-height: 33px;
}

.reference-number {
    width: 18px;
    height: 18px;
    background: #EBEEF2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #62676C;
}

.reference-desc {
    font-size: 12px;
    color: #696E73;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格样式 */
.message-table-wrapper {
    margin: 16px 0;
}

.message-table-title {
    font-weight: 500;
    font-size: 14px;
    color: #0F1115;
    margin-bottom: 8px;
}

.message-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.message-body table th {
    background: #f9fafb;
    font-weight: 500;
    color: #0F1115;
    padding: 8px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    line-height: 18px;;
}

.message-body table td {
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    line-height: 18px;
}

.message-body table tr:last-child td {
    border-bottom: none;
}

.message-body table tr:hover td {
    background: #f9fafb;
}

/* 暂停按钮样式 */
.pause-btn {
    background-color: #3b82f6 !important;
}

.pause-btn::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 2px;
}

/* 未登录状态样式 */
.history-empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.history-empty-state .empty-text {
    color: #9ca3af;
    font-size: 14px;
}

/* 未登录对话区域提示 */
.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 40px;
}

.login-prompt-content {
    text-align: center;
}

.prompt-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.prompt-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.prompt-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.prompt-text {
    font-size: 16px;
    color: #4b5563;
    margin: 0;
}

.login-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

/* 测试按钮样式 */
.test-login-btn {
    margin-top: 24px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.test-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 问小巴自我介绍样式 */
.intro-section {
    display: flex;
    margin-bottom: 24px;
    gap: 12px;
    width: 752px;
    padding: 24px;
    margin: 0 auto;
}

.intro-section .message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.intro-section .message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.intro-section .message-content {
    width: calc(100% - 52px);
}

.intro-section .message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.message-role-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.intro-section .message-text {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
}