/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

/* 修改网站头部样式 */
.site-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem; /* 减小上下padding */
    background: linear-gradient(to right, #2c3e50, #3498db);
}

.site-logo {
    width: 35px; /* 减小logo尺寸 */
    height: 35px;
    margin-right: 1rem;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.site-header h1 {
    font-size: 1.5rem; /* 减小标题字体大小 */
    margin: 0;
}

/* 导航栏样式 */
nav {
    background: linear-gradient(to right, #2c3e50, #3498db);
    padding: 0.5rem 0; /* 减小上下padding */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* 减小间距 */
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem; /* 减小字体大小 */
    padding: 0.3rem 0.8rem; /* 减小padding */
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.5s ease;
}

/* 标题样式 */
h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2.5rem;
}

h2 {
    color: #34495e;
    margin: 2rem 0 1rem;
}

/* 段落样式 */
p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* 留言板特定样式 */
.message-form {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1),
                -5px -5px 15px rgba(255,255,255,0.8);
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    margin: 1rem 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #2c3e50;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: #95a5a6;
    opacity: 0.8;
}

.message-form button {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

.message-form button:hover {
    background: linear-gradient(145deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.message-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 添加输入框字数统计 */
.textarea-wrapper {
    position: relative;
    margin: 1rem 0;
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.9rem;
    color: #95a5a6;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.message-list-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 1rem;
}

#messageList li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeIn 0.5s ease;
}

.message-content {
    font-size: 1.1rem;
}

.message-info {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.message-time, .message-lang {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 美化滚动条 */
.message-list-container::-webkit-scrollbar {
    width: 8px;
}

.message-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.message-list-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.message-list-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

#messageList {
    list-style: none;
    margin-top: 1rem;
}

#messageList li {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .container {
        margin: 1rem;
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .site-header {
        flex-direction: column;
        text-align: center;
    }
    
    .site-logo {
        margin-bottom: 1rem;
    }
}

/* 在现有样式后添加 */
.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
}

.language-selector select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: 'Microsoft YaHei', sans-serif;
    position: relative;
    min-width: 120px;
}

/* 添加下拉箭头 */
.language-selector::after {
    content: '\f0d7';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    pointer-events: none;
    transition: all 0.3s ease;
}

.language-selector:hover::after {
    transform: translateY(-50%) rotate(180deg);
}

.language-selector select:hover {
    border-color: #3498db;
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.language-selector select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 选项样式 */
.language-selector select option {
    background: white;
    color: #2c3e50;
    padding: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .language-selector {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }

    .language-selector select {
        padding: 0.4rem 2rem 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

/* Logo样式 */
.site-logo:hover {
    transform: rotate(360deg);
}

/* 背景图片和装饰 */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('imgs/logo2.jpg') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 卡片悬浮效果 */
.knowledge-card, .software-card {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.knowledge-card:hover, .software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 软件展示页面特定样式 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.software-card {
    text-align: center;
}

.software-card i {
    color: #3498db;
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #2980b9;
}

.app-links {
    margin-top: 1rem;
}

.app-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;

    text-decoration: none;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.app-links a:hover {
    background: #3498db;
    color: white;
}

/* 知识页面特定样式 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card-icon {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #3498db;
}

.chapter-content {
    margin: 1.5rem 0;
}

.chapter-content h3 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
}

.chapter-content p {
    color: #666;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
    gap: 0.8rem;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* 知识卡片的特殊动画 */
.knowledge-card {
    position: relative;
    overflow: hidden;
}

.knowledge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.knowledge-card:hover::before {
    transform: scaleX(1);
}

/* 轮播图样式 */
.carousel-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 16:9的反比 */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .software-content {
        grid-template-columns: 1fr;
    }

    .carousel-wrapper {
        padding-top: 177.78%; /* 保持16:9比例 */
    }

    .carousel-button {
        width: 30px;
        height: 30px;
    }
}

/* 软件展示页面布局 */
.software-content {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.software-info {
    flex: 1;  /* 占1份宽度 */
    max-width: 50%;  /* 限制最大宽度为1/3 */
}

.carousel-container {
    flex: 1;  /* 占2份宽度 */
    max-width: 50%;  /* 限制最大宽度为2/3 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .software-content {
        flex-direction: column;
    }

    .software-info,
    .carousel-container {
        max-width: 100%;
    }

    .software-info {
        margin-bottom: 2rem;
    }
}

/* 调整软件卡片在新布局中的样式 */
.software-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.software-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.software-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.software-card p {
    margin-bottom: 2rem;
}

.app-links {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-links a {
    width: 100%;
    padding: 0.8rem;
}

/* 软件卡片内容样式优化 */
.app-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.2rem;
    color: #3498db;
    margin: 0;
}

.version-info {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.version-info h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.version-info p {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
    margin: 0;
}

.app-description {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.app-description p {
    margin: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.download-btn:hover {
    background: linear-gradient(145deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.qr-codes {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 100px;
    height: 100px;
    margin-bottom: 0.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
}

.qr-code p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .app-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .qr-codes {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

/* 首页特定样式 */
.home-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 3rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.intro-text {
    font-size: 1.4rem;
    color: #2c3e50;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

.feature-card h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-link:hover {
    gap: 0.8rem;
    color: #2980b9;
}

.feature-link i {
    transition: transform 0.3s ease;
}

.feature-link:hover i {
    transform: translateX(3px);
}

.closing-section {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 15px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.closing-text {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .home-container {
        padding: 1.5rem;
    }

    .intro-text {
        font-size: 1.2rem;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* 下载按钮图标样式 */
.download-btn .fab.fa-android {
    color: #a4c639; /* Android 标志色 */
    font-size: 1.2rem;
    margin-right: 0.3rem;
    transition: all 0.3s ease;
}

.download-btn .fab.fa-apple {
    color: #a3aaae; /* Apple 标志色 */
    font-size: 1.2rem;
    margin-right: 0.3rem;
    transition: all 0.3s ease;
}

.download-btn:hover .fab {
    transform: scale(1.1);
    color: white; /* 悬浮时图标变白色 */
}

/* 详情页面样式 */
.detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #2980b9;
    transform: translateX(-5px);
}

.detail-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    height: 600px; /* 固定高度 */
}

.terms-list {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-y: auto; /* 添加垂直滚动条 */
    max-height: 100%; /* 确保不超过父容器高度 */
}

.term-button {
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.term-button:hover {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    transform: translateX(5px);
}

.term-button.active {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
}

.term-button i {
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.term-button:hover i,
.term-button.active i {
    opacity: 1;
}

.content-area {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-y: auto; /* 添加垂直滚动条 */
    max-height: 100%; /* 确保不超过父容器高度 */
}

.content-area h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.content-area p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* 美化滚动条样式 */
.terms-list::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
    width: 8px;
}

.terms-list::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.terms-list::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.terms-list::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .detail-content {
        grid-template-columns: 1fr;
        height: auto; /* 移动端取消固定高度 */
    }

    .terms-list,
    .content-area {
        max-height: 300px; /* 移动端设置单独的最大高度 */
    }
    
    .detail-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .term-button:hover {
        transform: translateX(0);
    }
}

/* 论坛样式 */
.forum-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.new-topic-btn {
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.new-topic-btn:hover {
    background: #2980b9;
}

.forum-categories {
    display: grid;
    gap: 2rem;
}

.category {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.topic-list {
    display: grid;
    gap: 1rem;
}

.topic-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.3s;
}

.topic-item:hover {
    background: #e9ecef;
}

.topic-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
}

.topic-info {
    overflow: hidden;
}

.topic-title {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.topic-meta {
    font-size: 0.9rem;
    color: #666;
}

.topic-stats {
    text-align: right;
    white-space: nowrap;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content select,
.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.modal-content textarea {
    min-height: 200px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.form-buttons button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-buttons button[type="submit"] {
    background: #3498db;
    color: white;
}

.form-buttons .cancel-btn {
    background: #95a5a6;
    color: white;
}

.form-buttons button:hover {
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .forum-container {
        padding: 1rem;
    }

    .topic-item {
        grid-template-columns: 1fr;
    }

    .topic-stats {
        text-align: left;
    }
}

/* 话题预览样式 */
.topic-preview {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 话题项目悬停效果 */
.topic-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* 语言标记样式 */
.topic-meta .lang-tag {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    margin-left: 0.5rem;
}

/* 话题详情页样式 */
.topic-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.topic-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-info {
    color: #666;
    font-size: 0.9rem;
}

.topic-body {
    line-height: 1.8;
    color: #333;
}

.replies-section {
    margin-top: 3rem;
}

.replies-list {
    margin: 2rem 0;
}

.reply-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.reply-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.reply-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.reply-form textarea {
    width: 100%;
    min-height: 150px;
    margin: 1rem 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .topic-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* 回复编辑样式 */
.reply-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.edit-reply,
.delete-reply {
    padding: 0.3rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.edit-reply {
    background: #3498db;
    color: white;
}

.delete-reply {
    background: #e74c3c;
    color: white;
}

.edit-reply:hover {
    background: #2980b9;
}

.delete-reply:hover {
    background: #c0392b;
}

.edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.8rem;
    border: 2px solid #3498db;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.edit-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.save-edit,
.cancel-edit {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-edit {
    background: #2ecc71;
    color: white;
}

.cancel-edit {
    background: #95a5a6;
    color: white;
}

.save-edit:hover {
    background: #27ae60;
}

.cancel-edit:hover {
    background: #7f8c8d;
}

/* 编辑状态提示 */
.edited-mark {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 0.5rem;
}

/* 回复项动画 */
.reply-item {
    transition: all 0.3s ease;
}

.reply-item:hover {
    transform: translateX(5px);
    background: #f5f6fa;
}

/* 回复头像样式 */
.reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 空回复提示样式 */
.empty-message {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .reply-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reply-actions {
        justify-content: flex-start;
    }
    
    .edit-buttons {
        flex-direction: column;
    }
    
    .edit-reply,
    .delete-reply,
    .save-edit,
    .cancel-edit {
        width: 100%;
    }
}

/* 回复相关样式 */
.replies-container {
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e0e0e0;
}

.toggle-replies {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.toggle-replies:hover {
    color: #2980b9;
}

.reply-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.reply-content {
    margin-bottom: 0.5rem;
}

.reply-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.reply-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    padding: 0;
}

.reply-btn:hover {
    color: #2980b9;
}

.no-replies {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1rem 0;
}

/* 搜索框样式 */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-box button {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: #2980b9;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
} 