/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    padding: 0.5rem;
    flex: 0 1 400px;
}

.nav-search input {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    width: 100%;
    outline: none;
}

.nav-search input::placeholder {
    color: rgba(255,255,255,0.8);
}

.nav-search button {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
}

.user-avatar i {
    font-size: 2rem;
    color: rgba(255,255,255,0.9);
}

/* 主要内容区 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 英雄区域 */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image i {
    font-size: 8rem;
    color: #667eea;
    opacity: 0.8;
}

/* 特色功能区域 */
.features-section {
    text-align: center;
    margin-bottom: 4rem;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 分区头部样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: #333;
}

.view-all {
    color: #667eea;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 贴吧区域 */
.tieba-section, .groups-section, .community-section {
    margin-bottom: 4rem;
}

.tieba-grid, .groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tieba-card, .group-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.tieba-card:hover, .group-card:hover {
    transform: translateY(-3px);
}

.tieba-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tieba-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.tieba-icon i {
    font-size: 1.8rem;
    color: white;
}

.tieba-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.member-count {
    color: #666;
    font-size: 0.9rem;
}

.tieba-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.join-btn, .join-group-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.join-btn:hover, .join-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 群组卡片样式 */
.group-card {
    display: flex;
    flex-direction: column;
}

.group-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.group-avatar i {
    font-size: 2rem;
    color: white;
}

.group-content {
    flex: 1;
    margin-bottom: 1rem;
}

.group-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.group-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.group-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.group-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 社区动态区域 */
.community-feed {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.post-avatar {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.post-avatar i {
    color: #666;
    font-size: 1.5rem;
}

.post-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.post-info span {
    color: #888;
    font-size: 0.9rem;
}

.post-content p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

.post-actions button {
    background: #f8f9fa;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-actions button:hover {
    background: #667eea;
    color: white;
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    margin-bottom: 0.5rem;
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .nav-search {
        flex: 1;
        width: 100%;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tieba-grid, .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
    }
}