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

/* 语言切换样式 */
.lang-toggle {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.lang-btn {
    background: none;
    border: 1px solid #333;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.lang-btn.active {
    background: #333;
    color: white;
}

/* 双语内容样式 */
.lang-zh, .lang-en {
    display: block;
}

.lang-en {
    display: none;
}

.en .lang-zh {
    display: none;
}

.en .lang-en {
    display: block;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #333;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 兴趣爱好部分样式 */
.hobbies-section {
    padding: 4rem 2rem;
    text-align: center;
}

.hobbies-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hobby-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hobby-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.hobby-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.hobby-card h3 {
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
    color: #2c3e50;
}

.hobby-card p {
    padding: 0 1.5rem 1.5rem;
    color: #7f8c8d;
}

.hobby-card .btn {
    margin-bottom: 1.5rem;
}

/* 特性部分样式 */
.features {
    background-color: #ecf0f1;
    padding: 4rem 2rem;
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: #3498db;
    font-size: 1.5rem;
}

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 2.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hobbies-section h2,
    .features h2 {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 论坛部分样式 */
.forum-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.forum-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.forum-posts {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.forum-post {
    padding: 2rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.forum-post:hover {
    background-color: #f8f9fa;
}

.forum-post:last-child {
    border-bottom: none;
}

.forum-post h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 1rem;
}

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

.post-actions a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-actions a:hover {
    color: #2980b9;
}

/* 图片画廊样式 */
.gallery-section {
    padding: 4rem 2rem;
    background-color: #ecf0f1;
}

.gallery-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* 创建新帖子样式 */
.create-post {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 800px;
}

.create-post h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #34495e;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

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