/* ==========================================
   FRIENDS SECTION - REDESIGN (RANKING STYLE)
   ========================================== */

/* Friends Container */
.friends-container-redesign {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Section Header */
.friends-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.95) 0%, rgba(20, 30, 50, 0.98) 100%);
    border-radius: 24px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.friends-section-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 4px 20px rgba(79, 195, 247, 0.6);
}

.friends-section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Add Friend Section */
.add-friend-redesign {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    gap: 15px;
    align-items: center;
}

.add-friend-input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.add-friend-input:focus {
    outline: none;
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.3);
}

.add-friend-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.add-friend-btn-redesign {
    padding: 15px 35px;
    background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 3px solid rgba(102, 187, 106, 0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.4);
}

.add-friend-btn-redesign:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 187, 106, 0.6);
}

/* Friends List Section */
.friends-list-section {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.friends-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid rgba(79, 195, 247, 0.3);
}

.friends-list-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.friends-count {
    background: rgba(79, 195, 247, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #4fc3f7;
}

/* Friend Items Grid */
.friends-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
    gap: 30px;
}

.friend-item-redesign {
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.9) 0%, rgba(10, 20, 40, 0.95) 100%);
    border-radius: 24px;
    padding: 25px 30px;
    border: 3px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    position: relative;
    overflow: visible;
}

.friend-item-redesign::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.15), transparent);
    transition: left 0.5s ease;
}

.friend-item-redesign:hover::before {
    left: 100%;
}

.friend-item-redesign:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 195, 247, 0.7);
    box-shadow: 0 10px 30px rgba(79, 195, 247, 0.5);
}

.friend-item-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
}

.friend-item-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(79, 195, 247, 0.5);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.friend-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-item-info {
    flex: 1;
    min-width: 0;
}

.friend-item-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-item-stats {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.friend-item-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    min-width: 50px;
}

.friend-item-stat-value {
    font-size: 1rem;
    font-weight: 900;
    color: #4fc3f7;
}

.friend-item-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.friend-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.friend-action-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.friend-action-btn.view {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(0, 188, 212, 0.3) 100%);
    border-color: rgba(79, 195, 247, 0.5);
    color: #4fc3f7;
}

.friend-action-btn.view:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.5) 0%, rgba(0, 188, 212, 0.5) 100%);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

.friend-action-btn.remove {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(211, 47, 47, 0.3) 100%);
    border-color: rgba(244, 67, 54, 0.5);
    color: #f44336;
}

.friend-action-btn.remove:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.5) 0%, rgba(211, 47, 47, 0.5) 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

/* Friend Requests Section */
.friend-requests-section {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.9) 0%, rgba(20, 30, 50, 0.95) 100%);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    border: 3px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.requests-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 20, 40, 0.9) 100%);
    border-radius: 16px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.request-item:hover {
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.3);
}

.request-item-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 193, 7, 0.5);
    overflow: hidden;
}

.request-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.request-item-info {
    flex: 1;
}

.request-item-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

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

.request-action-btn {
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.request-action-btn.accept {
    background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
    border-color: rgba(102, 187, 106, 0.6);
    color: #fff;
}

.request-action-btn.accept:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 187, 106, 0.6);
}

.request-action-btn.reject {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(211, 47, 47, 0.3) 100%);
    border-color: rgba(244, 67, 54, 0.5);
    color: #f44336;
}

.request-action-btn.reject:hover {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.5) 0%, rgba(211, 47, 47, 0.5) 100%);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .friends-items {
        grid-template-columns: 1fr;
    }
    
    .friend-item-content {
        flex-direction: column;
        text-align: center;
    }
    
    .friend-item-actions {
        width: 100%;
    }
    
    .friend-action-btn {
        width: 100%;
    }
    
    .add-friend-redesign {
        flex-direction: column;
    }
    
    .add-friend-btn-redesign {
        width: 100%;
    }
}
