body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    margin-top: 150px;
}

.banner {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
    transition: transform 0.3s ease;
    flex: 1 1 300px;
    min-width: 280px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.masonry, .teacher-grid, .resources-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.showcase-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.showcase-images img {
    width: calc(33.333% - 6px);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .card {
        flex: 1 1 calc(50% - 20px);
        min-width: 250px;
    }
    
    .showcase-images {
        flex-wrap: wrap;
    }
    
    .showcase-images img {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 15px 25px;
        margin-top: 120px;
    }
    
    .card {
        flex: 1 1 100%;
    }
    
    .showcase-images {
        gap: 6px;
    }
    
    .showcase-images img {
        width: calc(50% - 3px);
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        margin: 15px 0;
    }
    
    .showcase-images {
        flex-direction: column;
        gap: 8px;
    }
    
    .showcase-images img {
        width: 100%;
        margin-bottom: 0;
    }
    
    footer {
        text-align: center;
        padding: 20px 0;
    }
}

/* 基础间距优化 */
.section {
    margin-bottom: 30px;
}

.section-title {
    margin: 15px 0 10px;
    line-height: 1.3;
}

/* 卡片样式优化 */
.card {
    padding: 15px;
    margin: 8px 0;
}

/* 移动端特定优化 */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 8px;
    }
    
    .section {
        margin-bottom: 15px;
    }
    
    .section-title {
        margin: 12px 0 8px;
    }
    
    .card {
        padding: 10px;
        margin: 4px 0;
    }
    
    .card-body {
        padding: 6px;
    }
    
    .card-title {
        margin: 0 0 4px 0;
    }
    
    .card-text {
        margin: 0 0 6px 0;
    }
    
    .showcase-images {
        gap: 6px;
        margin: 8px 0;
    }
    
    .banner {
        margin-bottom: 10px;
    }
}

/* 更小屏幕的优化 */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .menu-button {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .menu-items {
        top: 55px;
        right: 10px;
        padding: 5px;
    }
    
    .menu-items a {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    p {
        margin: 4px 0;
        line-height: 1.3;
    }
    
    footer {
        padding: 15px 0;
        font-size: 0.85rem;
    }
    
    footer p {
        margin: 5px 0;
    }
}

/* 文案间距优化 */
p {
    margin: 8px 0;
    line-height: 1.4;
}

/* 标题间距优化 */
.section-title {
    margin: 15px 0 10px;
    line-height: 1.3;
}

/* 卡片内部间距优化 */
.card-body {
    padding: 10px;
}

.card-title {
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.card-text {
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* 图片相关间距优化 */
.banner {
    margin-bottom: 12px;
}

.showcase-images {
    gap: 8px;
    margin: 10px 0;
}

/* 修改容器和留白相关的样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 15px 25px;
    }
    
    .section {
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .card {
        margin: 8px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 94%;
        padding: 12px 20px;
        margin-top: 100px;
    }
    
    .section {
        padding: 0 8px;
        margin-bottom: 15px;
    }
    
    .menu-button {
        right: 15px;
    }
    
    .menu-items {
        right: 15px;
    }
    
    .card {
        margin: 6px;
        padding: 12px;
    }
    
    .showcase-images {
        padding: 0 5px;
    }
    
    footer {
        padding: 15px 10px;
        margin-top: 20px;
    }
}

/* 服务器链接样式优化 */
.server-links {
    padding: 10px 0;
    margin: 15px 0;
}

.server-links a {
    margin: 5px;
    padding: 10px 20px;
}

/* 内容区块间距优化 */
.section-title {
    padding: 0 5px;
    margin: 20px 0 15px;
}

.card-body {
    padding: 12px;
}

/* 列表项留白优化 */
.list-group-item {
    padding: 15px;
    margin-bottom: 10px;
}

/* 导航栏基础样式 */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
}

.nav-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0071e3;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: #0071e3;
    color: white;
}

/* 为主容器添加上边距，避免被导航栏遮挡 */
.container {
    margin-top: 70px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        z-index: 1001;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        font-size: 16px;
        padding: 12px 25px;
    }

    .nav-brand {
        font-size: 1.2rem;
        left: 15px;
    }
    
    .nav-content {
        justify-content: space-between;
    }
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .nav-links a {
        font-size: 15px;
        padding: 10px 20px;
    }

    .nav-brand {
        font-size: 1rem;
        left: 10px;
    }
}

/* 移动端显示汉堡包按钮 */
@media (max-width: 768px) {
    .menu-button {
        display: flex;
    }
    
    /* 点击后的动画效果（可选） */
    .menu-button.active::before {
        transform: translateY(7px) rotate(45deg);
    }
    
    .menu-button.active span {
        opacity: 0;
    }
    
    .menu-button.active::after {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* 导航栏基础样式 */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 0;
}

.nav-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: #0071e3;
    color: white;
}

/* 汉堡包按钮样式 */
.menu-button {
    display: none;
    width: 40px;
    height: 40px;
    background: #0071e3;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.menu-button span,
.menu-button span::before,
.menu-button span::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-button span {
    top: 19px;
    left: 10px;
}

.menu-button span::before {
    top: -6px;
    left: 0;
}

.menu-button span::after {
    top: 6px;
    left: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .menu-button {
        display: block;
        position: fixed;
        top: 15px;
        right: 20px;
        z-index: 1002;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1001;
    }

    .nav-links a {
        font-size: 16px;
        padding: 12px 25px;
    }

    .nav-links.show {
        display: flex;
    }

    /* 汉堡包按钮动画 */
    .menu-button.active span {
        background: transparent;
    }

    .menu-button.active span::before {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .menu-button.active span::after {
        transform: rotate(-45deg) translate(4px, -4px);
    }
}

/* 小屏幕适配 */
@media (max-width: 480px) {
    .menu-button {
        width: 35px;
        height: 35px;
        top: 12px;
        right: 15px;
    }

    .menu-button span,
    .menu-button span::before,
    .menu-button span::after {
        width: 18px;
    }

    .menu-button span {
        top: 16px;
        left: 8px;
    }

    .nav-links a {
        font-size: 16px;
    }
}

/* 添加/修改教师卡片相关样式 */
.teacher-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
}

.teacher-card {
    flex: 1 1 300px;
    max-width: 300px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.teacher-card img {
    width: 25%;  /* 设置为展示图片的1/4大小 */
    height: auto;
    border-radius: 50%;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.teacher-card-body {
    padding: 10px;
    text-align: left;
}

.teacher-card-body .card-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.teacher-card-body .card-text {
    margin: 0;
    line-height: 1.6;
}

.teacher-specialty,
.teacher-honors {
    display: block;
    margin: 8px 0;
    padding-left: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .teacher-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .teacher-card img {
        width: 30%;  /* 移动端稍微调大一点 */
    }
}

@media (max-width: 480px) {
    .teacher-card img {
        width: 35%;  /* 小屏幕下再稍微调大一点 */
    }
}

/* 修改视频容器样式 */
.video-container {
    position: relative;
    width: 66.666%;  /* 修改为页面宽度的2/3 */
    padding-top: 37.5%;  /* 保持16:9的比    (66.666% * 9/16 = 37.5%) */
    margin: 20px auto;  /* 上下间距20px，左右自动居中 */
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#guide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .video-container {
        width: 85%;  /* 在平板上稍微放大 */
        padding-top: 47.8%;  /* 保持16:9比例 (85% * 9/16) */
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .video-container {
        width: 100%;  /* 在手机上占满宽度 */
        padding-top: 56.25%;  /* 保持16:9比例 */
        margin: 10px auto;
    }
}

/* 修改文字段落的边距样式 */
.col-md-12 p {
    margin: 15px 0;  /* 默认边距 */
    line-height: 1.6;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .col-md-12 p {
        margin: 25px 0;  /* 增加平板端的上下边距 */
        line-height: 1.8;  /* 增加行高 */
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .col-md-12 p {
        margin: 20px 0;  /* 手机端的上下边距 */
        line-height: 1.7;
        font-size: 0.95rem;
    }
    
    /* 服务器链接文字的边距单独处理 */
    .col-md-12 p:last-of-type {
        margin: 30px 0 15px;  /* 上边距更大，与服务器按钮形成更好的视觉分隔 */
    }
}

/* 修改所有标题的颜色样式 */
.section-title {
    color: #0071e3;  /* 使用与品牌名称相同的蓝色 */
    margin: 20px 0 15px;
    line-height: 1.3;
    font-weight: 600;  /* 加粗以匹配品牌名称的字重 */
}

/* 保持其他标题（卡片标题等）为黑色 */
.card-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.teacher-card-body .card-title {
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.list-group-item h5 {
    color: #333;
    margin: 0;
}

/* 添加/修改页脚样式 */
footer {
    text-align: center;  /* 文字居中 */
    padding: 30px 0;     /* 增加上下内边距 */
    margin-top: 40px;    /* 增加与上方内容的间距 */
    border-top: 1px solid #eee;  /* 添加顶部分隔线 */
}

footer p {
    margin: 8px 0;       /* 调整段落间距 */
    color: #666;         /* 稍微柔和的文字颜色 */
    font-size: 0.95rem;  /* 稍微调小字号 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    footer {
        padding: 25px 0;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 20px 0;
        margin-top: 25px;
    }
    
    footer p {
        font-size: 0.9rem;
    }
}

/* 添加下载按钮样式 */
.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0 25px;
}

.download-btn {
    padding: 10px 20px;
    background-color: #0071e3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background-color: #005bbf;
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .download-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 12px 20px;
    }
}

/* 添加学习路径标题样式 */
.path-title {
    font-weight: 600;  /* 加粗字体 */
    color: #333;
    font-size: 1.1rem;  /* 稍微增大字号 */
    margin-top: 25px;  /* 增加上方间距 */
    margin-bottom: 15px;  /* 调整下方间距 */
}

/* 修改系统使用说明标题样式 */
#video-guide .section-title {
    color: #333;  /* 改为黑色 */
    font-size: 1.1rem;  /* 与学习路径标题大小一致 */
    font-weight: 600;  /* 保持加粗 */
    margin-top: 25px;
    margin-bottom: 15px;
}

/* 添加浮动卡通形象的样式 */
.floating-character {
    position: fixed;  /* 固定位置，不随滚动 */
    right: 30px;     /* 距离右边距离 */
    bottom: 30px;    /* 距离底部距离 */
    z-index: 999;    /* 确保显示在其他内容之上 */
    transition: all 0.3s ease;  /* 添加过渡效果 */
}

.mascot-image {
    width: 120px;    /* 设置图片宽度 */
    height: auto;    /* 保持宽高比 */
    cursor: pointer; /* 鼠标悬停显示手型 */
}

/* 添加悬停效果 */
.floating-character:hover {
    transform: translateY(-10px);  /* 悬停时向上浮动 */
}

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-character {
        right: 20px;
        bottom: 20px;
    }
    
    .mascot-image {
        width: 100px;  /* 移动端稍微缩小图片 */
    }
}

@media (max-width: 480px) {
    .floating-character {
        right: 15px;
        bottom: 15px;
    }
    
    .mascot-image {
        width: 80px;  /* 小屏幕进一步缩小 */
    }
}

/* Chat container styles */
.chat-container {
    position: fixed;
    right: 180px;
    bottom: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 998;
    display: none;
    overflow: hidden;
    transform: translate(0, 0); /* 确保有一个基准transform值 */
}

.chat-container.show {
    display: flex;
}

/* Chat header styles */
.chat-header {
    padding: 15px;
    background: #0071e3;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* 添加移动光标提示 */
    user-select: none; /* 防止文本选择 */
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

/* Chat messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* Chat input area */
.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    max-height: 100px;
    min-height: 36px;
}

.chat-input button {
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-input button:hover {
    background: #005bbf;
}

.new-chat-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #666;
    padding: 0;
    line-height: 1;
}

.new-chat-btn:hover {
    background: #f5f5f5;
    color: #0071e3;
    border-color: #0071e3;
}

/* Chat divider styles */
.chat-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 12px;
}

.chat-divider::before,
.chat-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.chat-divider span {
    padding: 0 10px;
    background: white;
    color: #999;
}

/* Mobile styles */
@media (max-width: 768px) {
    .chat-container {
        width: 90%;
        height: 70vh;
        right: 50%;
        transform: translateX(50%);
        bottom: 150px;
    }
    
    .chat-bubble {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chat-container {
        width: 95%;
        height: 70vh;
        right: 50%;
        transform: translateX(50%);
        bottom: 120px;
    }
    
    .chat-bubble {
        max-width: 90%;
        padding: 4px 6px;
    }
    
    .message-content {
        font-size: 14px;
    }
}

/* Message styles */
.message {
    margin-bottom: 5px;
    display: flex;
    position: relative;
    animation: message-in 0.5s ease-out;
}

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

/* 调整响应式动画的速度 */
@media (prefers-reduced-motion: reduce) {
    .chat-bubble, .message {
        animation-duration: 0.1s;
    }
}

/* 聊天泡泡基础样式 */
.chat-bubble {
    padding: 6px 8px;
    border-radius: 15px;
    max-width: 80%;
    text-align: left;
    line-height: 1.25; /* 调整行高，增加行间距 */
    position: relative;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    animation: bubble-pop 0.3s ease-out;
    transform-origin: bottom left;
}

.message-content {
    padding: 0;
    margin: 0;
    word-break: break-word; /* 防止长单词溢出 */
    white-space: normal; /* 使用normal代替pre-line，避免多余空行 */
    letter-spacing: -0.2px; /* 微调字符间距，使文字更紧凑 */
}

.ai-message {
    justify-content: flex-start;
}

.ai-message .chat-bubble {
    background: #f0f0f0;
    border-radius: 15px 15px 15px 0;
}

.user-message {
    justify-content: flex-end;
}

.user-message .chat-bubble {
    background: #0071e3;
    color: white;
    border-radius: 15px 15px 0 15px;
    transform-origin: bottom right; /* 用户消息从右下角弹出 */
}

/* 添加登录界面样式 */
.login-container {
    position: fixed;
    right: 180px;
    bottom: 30px;
    width: 300px;
    height: auto;
    min-height: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 998;
    display: none;
    padding: 20px;
    transition: all 0.3s ease;
    transform: translate(0, 0); /* 确保有一个基准transform值 */
    resize: none; /* 移除resize属性避免冲突 */
}

.login-container.show {
    display: block;
}

.login-header {
    text-align: center;
    margin: -20px -20px 20px -20px; /* 修正边距以填充整个顶部 */
    padding: 15px;
    color: #0071e3;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa; /* 添加背景色以区分头部 */
    border-radius: 12px 12px 0 0;
    cursor: move; /* 添加移动光标提示 */
    user-select: none; /* 防止文本选择 */
}

.close-login {
    background: none;
    border: none;
    color: #0071e3;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.login-form input:focus {
    border-color: #0071e3;
}

.login-form button {
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.login-form button:hover {
    background: #005bbf;
}

.login-error {
    color: #ff4444;
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .login-container {
        width: 90%;
        right: 50%;
        transform: translateX(50%);
        bottom: 150px;
    }
}

.login-header, .chat-header {
    /* 移除背景色过渡效果 */
    /* transition: background-color 0.2s; */
}

.login-header:hover, .chat-header:hover {
    /* 移除悬停时的背景色变化 */
    /* background-color: rgba(0, 0, 0, 0.05); */
    cursor: move;
}

/* 为拖拽添加通用样式 */
.draggable-window {
    position: fixed;
    transition: none; /* 移除拖拽过程中的过渡效果 */
    will-change: transform; /* 提示浏览器将会有变换，优化性能 */
}

.draggable-header {
    cursor: move;
    user-select: none;
}

.chat-bubble p {
    margin: 0 0 4px 0; /* 增加段落底部间距从3px到4px */
}

.chat-bubble p:last-child {
    margin-bottom: 0; /* 最后一个段落不需要底部间距 */
}

/* 聊天泡泡弹出动画 */
@keyframes bubble-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 让连续消息看起来更自然 */
.message:nth-child(n+1) {
    animation-delay: 0.1s;
}
.message:nth-child(n+2) {
    animation-delay: 0.2s;
}
.message:nth-child(n+3) {
    animation-delay: 0.3s;
}
.message:nth-child(n+4) {
    animation-delay: 0.4s;
}

/* 思考中的泡泡样式 */
.thinking-bubble {
    background-color: #f0f0f0 !important;
    position: relative;
}

/* 思考中点点的动画效果 */
@keyframes thinking-dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '...'; }
}

.thinking-dots::after {
    content: '';
    display: inline-block;
    width: 16px;
    animation: thinking-dots 1.2s infinite steps(1);
}

/* 添加学习路径弹性卡片动画设计样式 - 阿里云OSS兼容版 */
.learning-routes {
  padding: 40px 0 50px;
  margin-bottom: 50px;
  background: #f9fafc;
  border-radius: 16px;
  -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.learning-routes .section-title {
  text-align: center;
  font-size: 28px;
  margin-top: -15px;
  margin-bottom: 35px;
  color: #0071e3;
  position: relative;
}

.learning-routes .section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: #0071e3;
}

.routes-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  -webkit-box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 18px;
  background: white;
  overflow: hidden;
}

.route-toggle {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  border-bottom: 1px solid #eee;
}

.toggle-btn {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  position: relative;
}

.toggle-btn.active {
  color: #0071e3;
}

.toggle-btn.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #0071e3;
  -webkit-animation: slideIn 0.3s forwards;
  animation: slideIn 0.3s forwards;
}

.routes-container {
  position: relative;
  min-height: 450px;
}

/* 使用Flexbox替代Grid布局以增强兼容性 */
.route-options {
  display: none;
  padding: 30px 40px;
  /* 移除grid布局，改用flexbox */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -12.5px;
}

.route-options.active {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-animation: fadeIn 0.5s forwards;
  animation: fadeIn 0.5s forwards;
}

.option-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  -webkit-transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #f8f9fa;
  -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  min-height: 350px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  /* 用flex配合宽度和内边距实现网格效果 */
  -webkit-box-flex: 0;
  -ms-flex: 0 0 calc(33.333% - 25px);
  flex: 0 0 calc(33.333% - 25px);
  margin: 12.5px;
  width: calc(33.333% - 25px);
}

.option-card:hover {
  -webkit-transform: translateY(-10px);
  transform: translateY(-10px);
  -webkit-box-shadow: 0 20px 40px rgba(0, 113, 227, 0.15);
  box-shadow: 0 20px 40px rgba(0, 113, 227, 0.15);
}

.card-content {
  padding: 30px 20px 20px;
  text-align: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  height: 100%;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.option-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  color: #0071e3;
  padding: 12px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.option-card h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.option-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
}

.option-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #0071e3;
  color: white !important; /* 强制设置颜色 */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  margin-bottom: 30px;
  border: none;
  cursor: pointer;
}

.option-btn:hover {
  background: #005bbf;
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

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

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

@-webkit-keyframes slideIn {
  from { -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@keyframes slideIn {
  from { -webkit-transform: scaleX(0); transform: scaleX(0); }
  to { -webkit-transform: scaleX(1); transform: scaleX(1); }
}

/* 修复route-options在未激活时仍然显示的问题 */
.route-options {
  display: none;
}

.route-options.active {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

/* 移动端适配 */
@media (max-width: 992px) {
  .option-card {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 calc(50% - 25px);
    flex: 0 0 calc(50% - 25px);
    width: calc(50% - 25px);
  }
}

@media (max-width: 768px) {
  .route-options {
    padding: 20px;
  }
  
  .option-card {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 calc(100% - 25px);
    flex: 0 0 calc(100% - 25px);
    width: calc(100% - 25px);
    min-height: 320px;
  }
}

/* 语音按钮样式 */
.voice-input-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    padding: 0;
    margin: 0 5px;
}

.voice-input-btn:hover {
    background: #f5f5f5;
    border-color: #0071e3;
    color: #0071e3;
}

.play-voice {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.play-voice:hover {
    opacity: 1;
}

/* 修改消息气泡样式以适应语音按钮 */
.chat-bubble {
    display: flex;
    align-items: center;
}

.message-content {
    flex: 1;
}
