* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2ecc71;
}

nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    display: flex;
    list-style: none;
    margin-top: 0.5rem;
}

nav ul li {
    margin-left: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #2ecc71;
    transform: translateY(-1px);
}

.nav-link:active {
    transform: translateY(1px);
    transition: all 0.15s ease;
}

.nav-link.active {
    color: #2ecc71;
}

/* Main Content Styles */
main {
    margin-top: 120px;
    padding: 2rem 0;
    min-height: calc(100vh - 150px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

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

h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

/* Home Page Styles */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Connect Page Styles */
.connect-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.server-address, .server-version {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.connect-steps {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    grid-column: 1 / -1;
}

.connect-steps ol {
    margin-left: 1.5rem;
    font-size: 1.1rem;
}

.connect-steps li {
    margin-bottom: 0.5rem;
}

/* Commands Page Styles */
.commands-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.command-category {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.command-category table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.command-category th, .command-category td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.command-category th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.command-category tr:hover {
    background-color: #f8f9fa;
}

/* About Page Styles */
.about-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

/* Server Info Section */
.server-info, .contact-info {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.server-info .connect-steps {
    grid-column: 1 / -1;
}

.server-info ul {
    list-style: none;
    margin-left: 0;
}

.server-info li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.qq-group-link {
    display: inline-block;
    background-color: #2ecc71;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(46, 204, 113, 0.3);
}

.qq-group-link:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.qq-group-link:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    transition: all 0.15s ease;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Language Switcher Styles */
.language-switcher {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.lang-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.lang-btn:active {
    transform: translateY(1px);
    transition: all 0.15s ease;
}

.lang-btn.active {
    background-color: #2ecc71;
    border-color: #2ecc71;
}

/* Theme Switcher Styles */
.theme-switcher {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.theme-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.theme-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.theme-btn:active {
    transform: translateY(1px);
    transition: all 0.15s ease;
}

.theme-btn.active {
    background-color: #3498db;
    border-color: #3498db;
}

/* 深色模式样式 */
body.dark-theme {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* 浅色模式样式 */
body.light-theme {
    background-color: #f5f5f5;
    color: #333333;
}

/* 确保内容区域在深色模式下有合适的背景 */
body.dark-theme .page {
    background-color: #1a1a1a;
}

/* 确保页脚在深色模式下样式一致 */
body.dark-theme footer {
    background-color: #2c3e50;
}

/* 深色模式下的标题颜色 */
body.dark-theme h2 {
    color: #ffffff;
}

body.dark-theme h3 {
    color: #e0e0e0;
}

/* 深色模式下的内容卡片背景 */
body.dark-theme .feature,
body.dark-theme .server-address,
body.dark-theme .server-version,
body.dark-theme .connect-steps,
body.dark-theme .command-category,
body.dark-theme .about-content {
    background-color: #2c3e50;
    color: #ffffff;
}

/* 深色模式下的表格样式 */
body.dark-theme .command-category th {
    background-color: #34495e;
    color: #ffffff;
}

body.dark-theme .command-category td {
    color: #e0e0e0;
}

body.dark-theme .command-category tr:hover {
    background-color: #34495e;
}

body.dark-theme .server-info li {
    border-bottom-color: #34495e;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
    
    main {
        margin-top: 120px;
    }
    
    .features,
    .connect-info,
    .commands-list {
        grid-template-columns: 1fr;
    }
}

/* Players Page Styles */
.player-search {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-input {
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    width: 300px;
    max-width: 100%;
    transition: border-color 0.3s ease;
}

.player-input:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.search-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.search-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.search-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    transition: all 0.15s ease;
}

.player-results {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
}

.player-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.player-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #2ecc71;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.player-info {
    width: 100%;
}

.player-name {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: bold;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.player-list {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.player-list h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.online-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.online-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.online-player:hover {
    transform: translateY(-3px);
    background-color: #e3f2fd;
}

.online-player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.online-player-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2ecc71;
    margin-top: 0.5rem;
}

/* 错误消息样式 */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    
    .player-input {
        width: 100%;
        max-width: 400px;
    }
    
    .player-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .online-players {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .feature,
    .server-address,
    .server-version,
    .connect-steps,
    .command-category,
    .about-content,
    .player-results,
    .player-list {
        padding: 1.5rem;
    }
    
    .player-stats {
        grid-template-columns: 1fr;
    }
    
    .online-players {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 更新日志样式 */
.changelog {
    margin: 2rem auto;
    max-width: 800px;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.changelog h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.changelog-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.changelog-item {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    position: relative;
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #3498db;
    border: 2px solid white;
}

.changelog-date {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
}

.changelog-content h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.changelog-content ul {
    margin-left: 1.5rem;
    color: #555;
}

.changelog-content li {
    margin-bottom: 0.3rem;
    line-height: 1.6;
}

/* 深色模式下的更新日志样式 */
body.dark-theme .changelog {
    background-color: #2c3e50;
}

body.dark-theme .changelog h3 {
    color: #ffffff;
}

body.dark-theme .changelog-content h4 {
    color: #e0e0e0;
}

body.dark-theme .changelog-content ul {
    color: #cccccc;
}

body.dark-theme .changelog-item::before {
    border-color: #2c3e50;
}

/* 增强用户交互体验的样式 */
/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 导航栏链接悬停效果 */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 按钮悬停效果增强 */
.btn, .lang-btn, .theme-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover, .lang-btn:hover, .theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active, .lang-btn:active, .theme-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 卡片悬停效果 */
.feature-item, .command-category {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item:hover, .command-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 服务器信息区域悬停效果 */
.server-info-item {
    transition: all 0.3s ease;
}

.server-info-item:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 连接步骤悬停效果 */
.step-item {
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateX(10px);
    background-color: rgba(255, 255, 255, 0.1);
}

/* 语言和主题切换器动画 */
.language-switcher, .theme-switcher {
    transition: all 0.3s ease;
}

.lang-btn.active, .theme-btn.active {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 返回顶部按钮动画 */
.scroll-top-btn {
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #3498db;
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入效果 */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 滑动效果 */
.slide-in {
    transform: translateX(-100%);
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

/* 心跳效果（用于强调重要元素） */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite both;
}

/* Cookie同意弹窗样式 */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.cookie-consent-content {
    max-width: 800px;
    width: 100%;
}

.cookie-consent h3 {
    color: white;
    margin-top: 0;
    font-size: 1.5rem;
}

.cookie-consent p {
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: left;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accept-btn {
    background-color: #2ecc71;
    color: white;
}

.accept-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.reject-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.reject-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 深色主题下的Cookie弹窗样式 */
body.dark-theme .cookie-consent {
    background-color: rgba(0, 0, 0, 0.9);
}

body.light-theme .cookie-consent {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

body.light-theme .cookie-consent h3 {
    color: #2c3e50;
}

body.light-theme .cookie-consent p {
    color: #555;
}

body.light-theme .reject-btn {
    color: #2c3e50;
    border-color: #2c3e50;
}

body.light-theme .reject-btn:hover {
    background-color: rgba(44, 62, 80, 0.1);
}

/* 响应式Cookie弹窗 */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 1.5rem;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* 论坛页面样式 */
.forum-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.forum-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.create-post-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.create-post-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.create-post-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.15s ease;
}

.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-author {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.post-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.post-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.post-content {
    color: #34495e;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vote-btn {
    background-color: transparent;
    border: 2px solid #ddd;
    color: #7f8c8d;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.vote-btn.voted {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.vote-btn.voted.negative {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.vote-count {
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0.5rem;
}

.comment-btn, .delete-btn {
    background-color: transparent;
    border: 2px solid #ddd;
    color: #7f8c8d;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-btn:hover {
    background-color: #f8f9fa;
    border-color: #2ecc71;
    color: #2ecc71;
}

.delete-btn:hover {
    background-color: #f8f9fa;
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 评论区样式 */
.comments-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment-item {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #3498db;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.comment-content {
    color: #34495e;
    font-size: 0.95rem;
    line-height: 1.5;
}

.add-comment {
    margin-top: 1rem;
}

.comment-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.comment-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 模态框通用样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background-color: #3498db;
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #7f8c8d;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #7f8c8d;
    transform: translateY(-2px);
}

/* 深色主题样式 */
body.dark-theme .forum-content {
    background-color: #2c3e50;
    color: #ffffff;
}

body.dark-theme .post-item {
    background-color: #34495e;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

body.dark-theme .post-author,
body.dark-theme .post-title,
body.dark-theme .vote-count,
body.dark-theme .comments-title,
body.dark-theme .comment-author {
    color: #ffffff;
}

body.dark-theme .post-content,
body.dark-theme .post-date,
body.dark-theme .comment-content,
body.dark-theme .comment-date {
    color: #e0e0e0;
}

body.dark-theme .post-actions {
    border-top-color: #455a64;
}

body.dark-theme .vote-btn,
body.dark-theme .comment-btn,
body.dark-theme .delete-btn,
body.dark-theme .btn-secondary {
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme .vote-btn:hover,
body.dark-theme .comment-btn:hover,
body.dark-theme .delete-btn:hover,
body.dark-theme .btn-secondary:hover {
    background-color: #455a64;
    border-color: #3498db;
    color: #3498db;
}

body.dark-theme .comment-item {
    background-color: #455a64;
    border-left-color: #3498db;
}

body.dark-theme .comment-textarea,
body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background-color: #34495e;
    color: #ffffff;
    border-color: #555;
}

body.dark-theme .comment-textarea:focus,
body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.dark-theme .modal-content {
    background-color: #2c3e50;
    color: #ffffff;
}

body.dark-theme .form-group label {
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-content {
        padding: 1.5rem;
    }
    
    .post-item {
        padding: 1.2rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .forum-header {
        justify-content: center;
    }
    
    .create-post-btn {
        width: 100%;
        text-align: center;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .vote-buttons {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .vote-count {
        margin: 0.3rem 0;
    }
    
    .comment-btn, .delete-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

.post-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.post-title {
    font-size: 1.4rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: bold;
}

.post-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.post-action-btn {
    background-color: transparent;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.post-action-btn:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 登录/注册弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #2ecc71;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-btn {
    background-color: #2ecc71;
    color: white;
}

#submit-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

#toggle-form-btn {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

#toggle-form-btn:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* 深色模式下的论坛和登录弹窗样式 */
body.dark-theme .forum-content {
    background-color: #2c3e50;
}

body.dark-theme .create-post-btn {
    background-color: #3498db;
}

body.dark-theme .create-post-btn:hover {
    background-color: #2980b9;
}

body.dark-theme .post-item {
    background-color: #34495e;
}

body.dark-theme .post-author {
    color: #ffffff;
}

body.dark-theme .post-date {
    color: #bdc3c7;
}

body.dark-theme .post-title {
    color: #ffffff;
}

body.dark-theme .post-content {
    color: #e0e0e0;
}

body.dark-theme .modal-content {
    background-color: #2c3e50;
}

body.dark-theme .modal-header {
    background-color: #34495e;
}

body.dark-theme .form-group label {
    color: #ffffff;
}

body.dark-theme .form-group input {
    background-color: #34495e;
    color: #ffffff;
    border-color: #555;
}

body.dark-theme .form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.dark-theme #toggle-form-btn {
    color: #3498db;
    border-color: #3498db;
}

body.dark-theme #toggle-form-btn:hover {
    background-color: #3498db;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .forum-content {
        padding: 1.5rem;
    }
    
    .forum-header {
        justify-content: center;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .create-post-btn {
        width: 100%;
        text-align: center;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .post-author {
        font-size: 1.1rem;
    }
}