/* Module Pages Styles */
/* Shared styles for Explore and Leaderboard pages */

/* Page Container */
.page-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 5px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-2px);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #e2e8f0, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Tab Navigation */
.category-tabs,
.period-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-tab,
.period-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-tab.active,
.period-tab.active {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.category-tab:hover,
.period-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

/* Section Titles */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    margin-top: 30px;
}

.section-title:first-child {
    margin-top: 0;
}

/* EXPLORE PAGE STYLES */

/* Workout Cards */
.workout-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.workout-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.workout-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.workout-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.workout-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.workout-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workout-difficulty.beginner {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.workout-difficulty.intermediate {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.workout-difficulty.advanced {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.workout-difficulty.expert {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.workout-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
}

.workout-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.workout-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Trending List */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.trending-rank {
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    min-width: 24px;
    text-align: center;
}

.trending-info {
    flex: 1;
}

.trending-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.trending-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.trending-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

/* Challenge Cards */
.challenge-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.challenge-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.challenge-icon {
    font-size: 1.8rem;
}

.challenge-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
}

.challenge-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
}

.challenge-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.challenge-progress {
    margin-bottom: 15px;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.challenge-participants {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.challenge-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.challenge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.challenge-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.challenge-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

/* Community Posts */
.community-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.community-post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-info {
    flex: 1;
}

.username {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.post-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.post-content {
    margin-bottom: 12px;
}

.post-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-combo {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.post-actions {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* LEADERBOARD PAGE STYLES */

/* User Stats Card */
.user-stats-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.user-rank-badge {
    text-align: center;
}

.rank-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rank-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-stats {
    display: flex;
    gap: 20px;
    flex: 1;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-to-next {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.points-needed {
    color: rgba(255, 255, 255, 0.6);
}

/* Leaderboard List */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.leaderboard-item.champion {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 193, 7, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.leaderboard-item.runner-up {
    background: linear-gradient(45deg, rgba(192, 192, 192, 0.1), rgba(169, 169, 169, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.2);
}

.leaderboard-item.third-place {
    background: linear-gradient(45deg, rgba(205, 127, 50, 0.1), rgba(184, 115, 51, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.2);
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.rank-badge.gold {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #92400e;
}

.rank-badge.silver {
    background: linear-gradient(45deg, #c0c0c0, #e5e7eb);
    color: #374151;
}

.rank-badge.bronze {
    background: linear-gradient(45deg, #cd7f32, #d97706);
    color: #92400e;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-details {
    flex: 1;
}

.username {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2px;
}

.user-level {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.user-score {
    text-align: right;
}

.score-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.score-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

/* Category Leaders */
.category-leaders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.category-icon {
    font-size: 1.5rem;
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.category-leader {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.category-arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

/* Achievement List */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 12px;
}

.achievement-icon {
    font-size: 1.3rem;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.achievement-user {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Hidden content */
.category-content.hidden {
    display: none;
}

/* PROFILE PAGE STYLES */

.profile-content {
    display: flex;
    flex-direction: column;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.9);
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
}

.profile-username {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.profile-bio {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.4;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 12px;
}

.detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.detail-value {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .page-header {
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .category-tabs,
    .period-tabs {
        gap: 4px;
    }
    
    .category-tab,
    .period-tab {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .workout-card,
    .challenge-card,
    .user-stats-card {
        padding: 15px;
    }
    
    .workout-icon {
        font-size: 1.8rem;
    }
    
    .workout-title {
        font-size: 1.1rem;
    }
    
    .stats-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    .rank-number {
        font-size: 1.8rem;
    }

    .profile-card {
        padding: 15px;
    }
    .profile-avatar {
        width: 60px;
        height: 60px;
    }
}
