/* Friends Page Styles */

.friend-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    opacity: 0.9;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tab Navigation */
.friend-tabs {
    margin-bottom: 30px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.tab-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Friends Grid */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.friend-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

.friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.friend-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.friend-info p {
    margin: 0;
    color: #525252;
    font-size: 14px;
}

.friend-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.friend-stat {
    text-align: center;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.friend-stat .stat-label {
    display: block;
    font-size: 12px;
    color: #525252;
    margin-bottom: 5px;
}

.friend-stat .stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.friend-actions {
    display: flex;
    gap: 10px;
}

.btn-view, .btn-remove {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-remove {
    background: #ff6b6b;
    color: white;
}

.btn-view:hover, .btn-remove:hover {
    transform: translateY(-2px);
}

/* Friend Requests */
.requests-container {
    max-width: 600px;
    margin: 0 auto;
}

.request-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

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

.request-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.request-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.request-info p {
    margin: 0;
    color: #525252;
    font-size: 14px;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.btn-accept, .btn-decline {
    flex: 1;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-accept {
    background: #4CAF50;
    color: white;
}

.btn-decline {
    background: #ff6b6b;
    color: white;
}

.btn-accept:hover, .btn-decline:hover {
    transform: translateY(-2px);
}

/* Search Section */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: translateY(-2px);
}

.search-result {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-result-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.search-result-details h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.search-result-details p {
    margin: 0;
    color: #525252;
    font-size: 14px;
}

.search-result-actions {
    display: flex;
    gap: 10px;
}

.btn-add-friend, .btn-pending {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-add-friend {
    background: #4CAF50;
    color: white;
}

.btn-pending {
    background: #ff9800;
    color: white;
    cursor: not-allowed;
}

.btn-add-friend:hover {
    transform: translateY(-2px);
}

/* Leaderboard */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.leaderboard-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
}

.leaderboard-item.current-user {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
}

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 100%);
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-user-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

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

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

.leaderboard-stat .stat-label {
    font-size: 12px;
    color: #525252;
    margin-bottom: 5px;
}

.leaderboard-stat .stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

/* Friend Profile Modal */
.friend-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #525252;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-modal:hover {
    background-color: #f0f0f0;
}

.modal-body {
    padding: 25px;
}

.friend-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stat {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.profile-stat .stat-label {
    display: block;
    font-size: 12px;
    color: #525252;
    margin-bottom: 5px;
}

.profile-stat .stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.recent-activities h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.activities-list {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.activity-meta {
    font-size: 12px;
    color: #525252;
}

.activity-duration {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #525252;
}

.empty-state h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
}

.empty-state p {
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .friend-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .friend-stats-row {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-result {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .friend-profile-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .friend-stats {
        grid-template-columns: 1fr;
    }
    
    .friend-card {
        padding: 20px;
    }
    
    .friend-header {
        flex-direction: column;
        text-align: center;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
} 