/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 主容器 */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* 顶部导航 */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 0 0 15px 15px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #e0e0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-currency {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.coin-icon {
    font-size: 1.2rem;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #ffcc00;
    color: #333;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid white;
}

/* 主内容区 */
.main-content {
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 80px);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
    overflow-y: auto;
    max-height: calc(100vh - 150px);
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    position: relative;
    padding-left: 15px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 25px;
    background: linear-gradient(to bottom, #6a11cb, #2575fc);
    border-radius: 3px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    background-color: #f0f2f5;
    padding: 5px;
    border-radius: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    background-color: white;
    color: #2575fc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 任务卡片样式 */
.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.task-icon {
    font-size: 2.5rem;
    background-color: #f0f7ff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.task-info {
    flex: 1;
}

.task-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #333;
}

.task-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.task-rewards {
    display: flex;
    gap: 10px;
}

.reward {
    background-color: #f5f7fa;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.xp-icon, .badge-icon {
    font-size: 0.9rem;
}

.task-btn {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.task-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* 社交圈子样式 */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-height: none;
    overflow: visible;
}

.group-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.group-banner {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.group-members {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.group-info {
    padding: 15px;
}

.group-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.group-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    background-color: #f0f2f5;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #555;
}

.join-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: #2575fc;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.join-btn:hover {
    background-color: #1a65e0;
}

.join-btn.joined {
    background-color: #22c55e;
}

/* 商店样式 */
.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.shop-item {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.item-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.item-info {
    padding: 15px;
}

.item-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.item-info p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.item-price {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 10px;
}

.shop-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: #f59e0b;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.shop-btn:hover {
    background-color: #d97706;
}

/* 排行榜样式 */
.top-leaders {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 30px;
    padding: 20px 0;
}

.leader {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.leader:hover {
    transform: translateY(-5px);
}

.leader-avatar {
    position: relative;
    margin-bottom: 10px;
}

.leader-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #ddd;
}

.first-place .leader-avatar img {
    width: 90px;
    height: 90px;
    border-color: #ffd700;
}

.second-place .leader-avatar img {
    border-color: #c0c0c0;
}

.third-place .leader-avatar img {
    border-color: #cd7f32;
}

.leader-rank {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background-color: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    border: 2px solid white;
}

.first-place .leader-rank {
    background-color: #ffd700;
    color: #333;
}

.second-place .leader-rank {
    background-color: #c0c0c0;
    color: #333;
}

.third-place .leader-rank {
    background-color: #cd7f32;
    color: #333;
}

.leader-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.leader-score {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.first-place .leader-score {
    color: #ffd700;
}

.leaderboard-list {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f2f5;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item.current-user {
    background-color: #f0f7ff;
}

.rank {
    width: 30px;
    height: 30px;
    background-color: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.small-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
}

.username {
    font-weight: 500;
}

.score {
    font-weight: 500;
    color: #2575fc;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 100;
}

.mobile-nav {
    display: flex;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #2575fc;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-text {
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .main-header {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        padding: 5px;
        justify-content: flex-start;
    }
    
    .tasks-container, .groups-container, .shop-container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        height: calc(100vh - 140px);
        padding-bottom: 80px;
    }
    
    .mobile-nav {
        display: flex;
    }
} 