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

body {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 顶部标题区域 */
.header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.header h1 {
    font-size: 60px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: #c41e3a;
    letter-spacing: 8px;
}

.header .subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
    font-weight: normal;
    opacity: 0.8;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    margin-bottom: 50px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

/* 左侧视频区域 */
.video-section {
    flex: 1;
    min-width: 300px;
    background-image: url('images/20250829_091202.791.jpg');
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.video-section::before {
    content: none;
    background: none;
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

.video-title {
    font-size: 24px;
    color: #fff;
    position: absolute;
    top: 15px;
    left: 50px;
    margin: 0;
    z-index: 2;
    line-height: 30px;
}

.party-emblem {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background-color: #c41e3a;
    border-radius: 50%;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    z-index: 2;
}

.play-button {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 222, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
}

.play-button:hover {
    background-color: rgba(255, 222, 0, 1);
    transform: scale(1.05);
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-left: 25px solid #333;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
}

/* 右侧功能区域 */
.features-section {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
    margin: 10px;
}

.feature-box {
    height: 170px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    padding: 15px;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.teaching {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L1 9l4 2v6h2v-4l5 2 5-2v4h2v-6l4-2-11-6zm-3 12l-2-2-2 2 2 2 2-2zm4 0l2-2 2 2-2 2-2-2zm-4 4l-2-2-2 2 2 2 2-2zm4 0l2-2 2 2-2 2-2-2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L1 9l4 2v6h2v-4l5 2 5-2v4h2v-6l4-2-11-6zm-3 12l-2-2-2 2 2 2 2-2zm4 0l2-2 2 2-2 2-2-2zm-4 4l-2-2-2 2 2 2 2-2zm4 0l2-2 2 2-2 2-2-2z'/%3E%3C/svg%3E") no-repeat center;
}

.admin {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.2.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.92-3.5 3.2-6 3.2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.2.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.92-3.5 3.2-6 3.2z'/%3E%3C/svg%3E") no-repeat center;
}

.logistics {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z'/%3E%3C/svg%3E") no-repeat center;
}

.decision {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.66.59-1.09 1.56-1.09.96 0 1.36.39 1.45 1.03l1.39-.57c-.2-.86-.77-1.81-2.1-2.32V6H10.5v1.51c-1.6.37-2.81 1.46-2.81 3 0 2.02 1.66 2.84 3.86 3.27 1.94.43 2.34.98 2.34 1.68 0 .73-.59 1.13-1.73 1.13-1.14 0-1.67-.4-1.81-1.13l-1.42.55c.25 1.32 1.27 2.04 3.22 2.44V18h2.5v-1.5c1.74-.33 2.93-1.45 2.93-3 0-2.22-1.98-2.86-3.86-3.26z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.66.59-1.09 1.56-1.09.96 0 1.36.39 1.45 1.03l1.39-.57c-.2-.86-.77-1.81-2.1-2.32V6H10.5v1.51c-1.6.37-2.81 1.46-2.81 3 0 2.02 1.66 2.84 3.86 3.27 1.94.43 2.34.98 2.34 1.68 0 .73-.59 1.13-1.73 1.13-1.14 0-1.67-.4-1.81-1.13l-1.42.55c.25 1.32 1.27 2.04 3.22 2.44V18h2.5v-1.5c1.74-.33 2.93-1.45 2.93-3 0-2.22-1.98-2.86-3.86-3.26z'/%3E%3C/svg%3E") no-repeat center;
}

/* 右侧四个功能模块 - 参照图片方块配色 */
.box1 {
    background: linear-gradient(135deg, #29b6f6 0%, #1e88e5 100%);
    color: #fff;
}
.box2 {
    background: linear-gradient(135deg, #ffb74d 0%, #fb8c00 100%);
    color: #fff;
}
.box3 {
    background: linear-gradient(135deg, #4dd0e1 0%, #00bcd4 100%);
    color: #fff;
}
.box4 {
    background: linear-gradient(135deg, #f48fb1 0%, #ec407a 100%);
    color: #fff;
}

/* 底部服务区域 */
.services-section {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 15px;
    margin-bottom: 30px;
    width: 100%;
}

.service-box {
    height: 120px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    padding: 10px;
    color: #fff;
}

.service-box:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    background-color: #ffffff;
    border-radius: 6px;
}

.course {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z'/%3E%3Cpath d='M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12z'/%3E%3Cpath d='M13.5 10.5h2V12h-2zm1.5 2h-2v-2h2zm-3-4h-2v2h2zm0 4h-2v2h2zm6-6h-2v2h2zm0 4h-2v2h2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z'/%3E%3Cpath d='M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12z'/%3E%3Cpath d='M13.5 10.5h2V12h-2zm1.5 2h-2v-2h2zm-3-4h-2v2h2zm0 4h-2v2h2zm6-6h-2v2h2zm0 4h-2v2h2z'/%3E%3C/svg%3E") no-repeat center;
}

.live {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 10.48V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4.48l4 3.98v-11l-4 3.98zm-2 5.52v-2l4 3.98V6.52L16 10.5V6H4v12h12v-2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 10.48V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4.48l4 3.98v-11l-4 3.98zm-2 5.52v-2l4 3.98V6.52L16 10.5V6H4v12h12v-2z'/%3E%3C/svg%3E") no-repeat center;
}

.thinktank {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z'/%3E%3C/svg%3E") no-repeat center;
}

.vr {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-6h11v6zm5 0h-3v-6h3v6zm0-8H4V6h16v4z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-6h11v6zm5 0h-3v-6h3v6zm0-8H4V6h16v4z'/%3E%3C/svg%3E") no-repeat center;
}

.cloud {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3C/svg%3E") no-repeat center;
}

/* 底部六个服务模块 - 参照图片方块配色 */
.service-box:nth-child(1) {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    color: #fff;
}
.service-box:nth-child(2) {
    background: linear-gradient(135deg, #ffe082 0%, #ffc107 100%);
    color: #fff;
}
.service-box:nth-child(3) {
    background: linear-gradient(135deg, #a5d6a7 0%, #4caf50 100%);
    color: #fff;
}
.service-box:nth-child(4) {
    background: linear-gradient(135deg, #80deea 0%, #00acc1 100%);
    color: #fff;
}
.service-box:nth-child(5) {
    background: linear-gradient(135deg, #b39ddb 0%, #7e57c2 100%);
    color: #fff;
}
.service-box:nth-child(6) {
    background: linear-gradient(135deg, #f8bbd0 0%, #ec407a 100%);
    color: #fff;
}

.add-box {
    font-size: 30px;
    background: linear-gradient(135deg, #f8bbd0 0%, #ec407a 100%);
    color: #fff;
}

/* 底部信息区域 */
.footer {
    text-align: center;
    font-size: 14px;
    color: #fff;
    margin-top: 20px;
    padding: 10px;
    width: 100%;
    max-width: 1000px;
    background-color: #e90027;
    border-radius: 4px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link > .feature-box,
.card-link > .service-box {
    pointer-events: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .services-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }
    
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .services-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .video-section, .features-section {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 28px;
    }
    
    .services-section {
        grid-template-columns: 1fr;
    }
    
    .footer {
        font-size: 12px;
    }
}

/* DeepSeek Chat 样式作用域（不影响现有页面） */
#deepseek-app {
    font-family: 'Inter', sans-serif;
    /* 确保 #deepseek-app 占满视口并作为弹性容器 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* 垂直排列子元素 */
}

#deepseek-app .app-container {
    /* app-container 占据剩余空间 */
    flex: 1;
    display: flex;
    width: 100%;
    min-height: 0; /* 允许 flex item 收缩 */
}

/* 侧边栏样式 */
#deepseek-app .sidebar {
    width: 260px;
    background-color: var(--sidebar-bg, #f9fafb);
    border-right: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    flex-shrink: 0; /* 防止侧边栏被压缩 */
}
#deepseek-app .sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}
#deepseek-app .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
    color: #8B0000;
}
#deepseek-app .new-chat-btn {
    margin: 16px;
    padding: 10px 16px;
    background-color: var(--primary-color, #2563eb);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}
#deepseek-app .new-chat-btn:hover {
    background-color: #1d4ed8;
}
#deepseek-app .history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
#deepseek-app .history-item {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6b7280);
}
#deepseek-app .history-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
#deepseek-app .sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#deepseek-app .theme-toggle {
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6b7280);
}
#deepseek-app .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
#deepseek-app.dark-mode {
    --primary-color: #3b82f6;
    --sidebar-bg: #111827;
    --chat-bg: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --user-msg-bg: #374151;
    --bot-msg-bg: #1e293b;
}

/* 主内容区域 */
#deepseek-app .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* 允许 flex item 收缩 */
    height: 100%;
    position: relative;
}

/* 头部 */
#deepseek-app .chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--chat-bg, #ffffff);
    z-index: 10;
    flex-shrink: 0; /* 防止头部被压缩 */
}
#deepseek-app .model-selector select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--chat-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    font-size: 14px;
    cursor: pointer;
}
#deepseek-app .chat-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
#deepseek-app .sidebar-toggle {
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--chat-bg, #fff);
    color: var(--text-primary, #1f2937);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}
#deepseek-app.dark-mode .sidebar-toggle {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

/* 聊天容器 - 关键部分：始终可滚动，消息多时出现滚动条 */
#deepseek-app .chat-container {
    flex: 1;
    overflow-y: auto; /* 始终显示垂直滚动条（如果内容超出） */
    padding: 20px;
    scroll-behavior: smooth;
    background-color: var(--chat-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    min-height: 0; /* 允许 flex item 收缩 */
    display: flex;
    flex-direction: column;
}

/* 消息气泡 */
#deepseek-app .message {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
#deepseek-app .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
    /* 添加最小宽度和高度，以防内容影响尺寸 */
    min-width: 36px;
    min-height: 36px;
    line-height: 1;
    text-align: center;
}
#deepseek-app .user-avatar {
    background-color: #9ca3af;
}
#deepseek-app .message-content {
    flex: 1;
    min-width: 0; /* 允许消息内容区收缩 */
}
#deepseek-app .message-text {
    padding: 16px;
    border-radius: 12px;
    background-color: var(--bot-msg-bg, #f8fafc);
    white-space: pre-wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    word-wrap: break-word; /* 确保长单词也能换行 */
}
#deepseek-app .user-message {
    justify-content: flex-end;
}
#deepseek-app .user-message .message-content {
    background-color: var(--user-msg-bg, #f3f4f6);
}
#deepseek-app .bot-message {
    justify-content: flex-start;
}
#deepseek-app .bot-message .message-content {
    background-color: var(--bot-msg-bg, #f8fafc);
}

/* 输入区域 - 关键部分：始终固定在底部 */
#deepseek-app .input-container {
    padding: 16px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--chat-bg, #ffffff);
    flex-shrink: 0; /* 防止输入区域被压缩 */
    /* 添加安全区域适配，防止被浏览器底部按钮遮挡 */
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
#deepseek-app .input-box {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 6px;
    background-color: var(--chat-bg, #ffffff);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
#deepseek-app .message-input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 16px;
    resize: none;
    height: 60px;
    background: transparent;
    color: var(--text-primary, #1f2937);
    min-height: 60px; /* 确保最小高度 */
    max-height: 150px; /* 限制最大高度 */
    overflow-y: auto; /* 输入内容多时内部滚动 */
}
#deepseek-app .message-input:focus {
    outline: none;
}
#deepseek-app .send-button {
    align-self: flex-end;
    padding: 10px 16px;
    background-color: var(--primary-color, #2563eb);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin: 6px;
    flex-shrink: 0; /* 防止按钮被压缩 */
}
#deepseek-app .send-button:disabled {
    background-color: var(--text-secondary, #6b7280);
    cursor: not-allowed;
}

/* 头部右侧按钮样式 */
#deepseek-app .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#deepseek-app .header-right button {
    position: relative;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--chat-bg, #fff);
    color: var(--text-primary, #1f2937);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

#deepseek-app .header-right #dot {
    position: absolute;
    right: 2px;
    top: 2px;
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    display: inline-block;
}

/* 代码块 */
#deepseek-app pre {
    background-color: rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}
#deepseek-app.dark-mode pre {
    background-color: rgba(255,255,255,0.1);
}
#deepseek-app code {
    font-family: 'Monaco','Menlo','Ubuntu Mono', monospace;
    font-size: 14px;
}

/* 欢迎状态 */
#deepseek-app .welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary, #6b7280);
    width: 100%;
}
#deepseek-app .welcome-icon {
    font-size: 60px;
    margin-bottom: 40px;
}
#deepseek-app .welcome-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary, #1f2937);
}
#deepseek-app .welcome-state p {
    font-size: 16px;
    margin-bottom: 40px;
    max-width: 600px;
}
#deepseek-app .suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    max-width: 800px;
    margin-top: 24px;
    width: 100%;
}
#deepseek-app .suggestion-card {
    padding: 16px;
    border-radius: 8px;
    background-color: var(--bot-msg-bg, #f8fafc);
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s;
    width: 100%;
}
#deepseek-app .suggestion-card:hover {
    transform: translateY(-2px);
    background-color: var(--user-msg-bg, #f3f4f6);
}
#deepseek-app .welcome-icon img {
    height: 80px;
    object-fit: contain;
    display: block;
}

/* 移动端自适应优化 */
@media (max-width: 768px) {
    #deepseek-app .sidebar {
        position: fixed;
        left: -260px;
        height: 100%;
        z-index: 100;
        transition: left 0.3s;
    }
    #deepseek-app .sidebar.active {
        left: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    #deepseek-app .menu-toggle {
        display: block;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 101;
        background: var(--primary-color, #2563eb);
        color: #fff;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    #deepseek-app .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    #deepseek-app .overlay.active {
        display: block;
    }
    
    /* 调整主内容区域在移动端的布局 - 保持为 column 是错误的，应该保持 row */
    /* #deepseek-app .app-container { flex-direction: column; } 这行已删除 */
    /* #deepseek-app .main-content { height: auto; } 这行已删除 */
    
    /* 调整聊天容器在移动端的内边距 */
    #deepseek-app .chat-container { 
        padding: 10px; 
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    /* 调整消息气泡在移动端的最大宽度和边距 */
    #deepseek-app .message { 
        max-width: 100%; 
        margin-left: 0; 
        margin-right: 0; 
        gap: 12px;
        width: 100%;
    }
    #deepseek-app .message-content { 
        max-width: calc(100% - 48px); 
    } /* 48px is avatar width (36px) + gap (12px) */
    /* 调整消息文本在移动端的内边距 */
    #deepseek-app .message-text { 
        padding: 12px; 
    }
    /* --- 新增：调整消息头像在移动端的尺寸 --- */
    #deepseek-app .message .avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 14px;
        line-height: 1;
        text-align: center;
    }
    /* --- 新增结束 --- */
    /* 调整输入框容器在移动端的内边距 */
    #deepseek-app .input-container { 
        padding: 12px; 
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        flex-shrink: 0;
    }
    /* 调整输入框在移动端的样式 */
    #deepseek-app .input-box { 
        padding: 4px; 
        border-radius: 8px; 
    }
    #deepseek-app .message-input { 
        padding: 10px; 
        font-size: 14px; 
        height: 50px; 
        min-height: 50px; 
    }
    #deepseek-app .send-button { 
        padding: 8px 12px; 
        border-radius: 6px; 
        margin: 4px; 
        font-size: 14px; 
    }
    /* 调整欢迎状态在移动端的样式 */
    #deepseek-app .welcome-state {
        flex: 1;
        padding: 10px;
    }
    #deepseek-app .welcome-title { 
        font-size: 24px; 
        margin-bottom: 15px; 
    }
    #deepseek-app .welcome-state p { 
        font-size: 14px; 
        margin-bottom: 30px;
        max-width: 100%;
    }
    #deepseek-app .suggestions { 
        gap: 10px; 
        margin-top: 20px;
        width: 100%;
    }
    #deepseek-app .suggestion-card { 
        padding: 12px; 
    }
    /* 调整头部在移动端的内边距 */
    #deepseek-app .chat-header { 
        padding: 12px; 
    }
    /* 调整模型选择器在移动端的字体大小 */
    #deepseek-app .model-selector select { 
        padding: 4px 8px; 
        font-size: 12px; 
    }
    /* 调整侧边栏在移动端的宽度和内边距 */
    #deepseek-app .sidebar { 
        width: 220px; 
    }
    #deepseek-app .sidebar-header { 
        padding: 12px; 
    }
    #deepseek-app .new-chat-btn { 
        margin: 12px; 
        padding: 8px 12px; 
        font-size: 14px; 
    }
    #deepseek-app .history-list { 
        padding: 6px; 
    }
    #deepseek-app .history-item { 
        padding: 8px 10px; 
        font-size: 14px; 
    }
    #deepseek-app .sidebar-footer { 
        padding: 12px; 
    }
    #deepseek-app .theme-toggle { 
        padding: 6px; 
        font-size: 14px; 
    }
    /* 调整欢迎图标在移动端的大小 */
    #deepseek-app .welcome-icon { 
        font-size: 50px; 
        margin-bottom: 30px; 
    }
    #deepseek-app .welcome-icon img { 
        height: 60px; 
    }
    
    /* 新增：优化移动端消息对齐 */
    #deepseek-app .user-message {
        justify-content: flex-end;
        margin-right: 15px;
    }
    #deepseek-app .bot-message {
        justify-content: flex-start;
        margin-left: 15px;
    }
    
    /* 新增：优化移动端按钮样式 */
    #deepseek-app .header-right button {
        padding: 5px 8px;
        font-size: 14px;
    }
    
    #deepseek-app .header-right #dot {
        width: 6px;
        height: 6px;
        right: 1px;
        top: 1px;
    }
    
    /* 优化欢迎状态在移动端的显示 */
    #deepseek-app .welcome-state {
        justify-content: flex-start;
        padding-top: 20px;
    }
}
@media (min-width: 769px) {
    #deepseek-app .menu-toggle, #deepseek-app .overlay { display: none; }
}

/* 更小屏幕的优化 */
@media (max-width: 480px) {
    #deepseek-app .sidebar {
        width: 200px;
    }
    
    #deepseek-app .message {
        margin-bottom: 16px;
        gap: 8px;
    }
    
    #deepseek-app .message .avatar {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 12px;
        line-height: 1;
        text-align: center;
    }
    
    #deepseek-app .message-text {
        padding: 10px;
        font-size: 14px;
    }
    
    #deepseek-app .input-container {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    
    #deepseek-app .input-box {
        padding: 2px;
        border-radius: 6px;
    }
    
    #deepseek-app .message-input {
        padding: 8px;
        font-size: 14px;
        height: 44px;
        min-height: 44px;
    }
    
    #deepseek-app .send-button {
        padding: 6px 10px;
        border-radius: 4px;
        margin: 2px;
        font-size: 13px;
    }
    
    #deepseek-app .chat-header {
        padding: 10px;
    }
    
    #deepseek-app .model-selector select {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    #deepseek-app .sidebar-header {
        padding: 10px;
    }
    
    #deepseek-app .new-chat-btn {
        margin: 10px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    #deepseek-app .history-list {
        padding: 4px;
    }
    
    #deepseek-app .history-item {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    #deepseek-app .sidebar-footer {
        padding: 10px;
    }
    
    #deepseek-app .theme-toggle {
        padding: 4px;
        font-size: 13px;
    }
    
    #deepseek-app .welcome-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    #deepseek-app .welcome-state p {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    #deepseek-app .suggestions {
        gap: 8px;
        margin-top: 15px;
    }
    
    #deepseek-app .suggestion-card {
        padding: 10px;
    }
    
    #deepseek-app .welcome-icon {
        font-size: 40px;
        margin-bottom: 20px;
    }
    
    #deepseek-app .welcome-icon img {
        height: 50px;
    }
    
    /* 更小屏幕的欢迎状态优化 */
    #deepseek-app .welcome-state {
        padding: 5px;
    }
    
    #deepseek-app .welcome-title {
        font-size: 18px;
    }
    
    #deepseek-app .welcome-state p {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    #deepseek-app .suggestions {
        gap: 6px;
        margin-top: 10px;
    }
}

/* 移动端优化：隐藏预制问题卡片，只显示欢迎信息 */
@media (max-width: 768px) {
    #deepseek-app .suggestions {
        display: none;
    }
    
    #deepseek-app .welcome-state {
        justify-content: center;
        padding: 20px 10px;
    }
    
    #deepseek-app .welcome-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    #deepseek-app .welcome-state p {
        font-size: 14px;
        margin-bottom: 20px;
        max-width: 100%;
    }
    
    #deepseek-app .welcome-icon {
        font-size: 50px;
        margin-bottom: 20px;
    }
}

/* 桌面端侧栏折叠：与 DeepSeek 一致体验 */
#deepseek-app.sidebar-collapsed .sidebar {
    width: 0;
    overflow: hidden;
    border-right: none;
}
/* 当侧边栏折叠时，主内容区域宽度调整 */
#deepseek-app.sidebar-collapsed .main-content {
    width: 100%;
}