/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* 导航栏 */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

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

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #3498db;
}

/* 语言切换器 */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    transition: background-color 0.3s;
}

.language-switcher a:hover {
    background-color: #3498db;
}

.language-switcher a.active {
    background-color: #3498db;
}

/* 主体内容 */
.hero {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
    padding: 10rem 0 5rem;
    margin-bottom: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

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

.btn.primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

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

/* 特色服务 */
.features {
    padding: 3rem 0;
    background-color: white;
}

.features .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.feature {
    flex: 1;
    min-width: 250px;
    padding: 1.5rem;
    text-align: center;
    margin: 0 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* 服务器预览 */
.servers-preview {
    padding: 3rem 0;
    background-color: #ecf0f1;
}

.servers-preview h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.server-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.server-card {
    flex: 1;
    min-width: 250px;
    background-color: white;
    margin: 0 1rem 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.server-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.center {
    text-align: center;
}

/* 联系我们 */
.contact-us {
    padding: 3rem 0;
    background-color: white;
}

.contact-us h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    flex: 1;
    max-width: 600px;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

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

.contact-info li:last-child {
    border-bottom: none;
}

/* 加入我们 */
.join-us {
    padding: 3rem 0;
    background-color: #ecf0f1;
    text-align: center;
}

.join-us h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.join-us p {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.join-content {
    display: flex;
    justify-content: center;
}

.join-info {
    flex: 1;
    max-width: 800px;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.join-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.join-info ul {
    margin-bottom: 1.5rem;
}

.join-info li {
    margin-bottom: 0.5rem;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* 关于我们页面和社区页面的容器间距 */
body:not(.home-page) > .container {
    padding-top: 5rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: white;
    margin-left: 1rem;
    text-decoration: none;
}

.social-links a:hover {
    text-decoration: underline;
}

/* 服务器页面 */
.servers-page h1 {
    text-align: center;
    margin: 2rem 0;
    color: #2c3e50;
}

.server-detail {
    background-color: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.server-detail h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.server-detail ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* 关于我们页面 */
.team-intro {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.team-member {
    flex: 1;
    min-width: 300px;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.values h3 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem;
}

/* 社区页面 */
.activities,
.rules,
.join-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.activity,
.join-option {
    flex: 1;
    min-width: 250px;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* 响应式设计 - 汉堡菜单 */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* 在小屏幕上也保持顶部间距 */
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #2c3e50;
        transition: 0.3s;
        z-index: 999;
        overflow-y: auto;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
    }
    
    nav ul li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .hero {
        padding: 8rem 0 3rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .features .container,
    .server-list,
    .team-intro,
    .activities,
    .rules,
    .join-options,
    .contact-content,
    .join-content {
        flex-direction: column;
    }
    
    .feature,
    .server-card,
    .team-member,
    .activity,
    .join-option,
    .contact-info,
    .join-info {
        margin: 1rem 0;
    }
    
    footer .container {
        flex-direction: column;
    }
    
    .social-links {
        margin-top: 1rem;
    }
    
    .social-links a {
        margin: 0 0.5rem;
    }
}