.lopwon_friends {
    margin: 2em auto;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.lopwon_friends ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0;
    width: 100%;
}

/* 单个卡片时的样式 - 电脑端左边显示并缩进 */
.lopwon_friends ul.single-card {
    justify-items: start;
}

.lopwon_friends ul.single-card > li.friend-card {
    grid-column: 1 / 2;
    margin-left: 15%;
    max-width: 60%;
    width: 60%;
}

/* 兼容：如果没有single-card类，使用CSS选择器 */
.lopwon_friends ul > li.friend-card:only-child,
.lopwon_friends ul > li.friend-card:only-of-type {
    grid-column: 1 / 2;
    justify-self: start;
    margin-left: 15%;
    max-width: 60%;
    width: 60%;
}

.lopwon_friends-title {
    position: relative;
    padding: 1em 1.5em;
    font-size: 1.6em;
    color: #323232;
    line-height: 1.4;
    margin-bottom: 1em;
    font-weight: 600;
    grid-column: 1 / -1;
}

.lopwon_friends-title:before {
    position: absolute;
    top: 1.2em;
    left: 0;
    content: '';
    width: 4px;
    height: 1.2em;
    background-color: #ff8800;
    border-radius: 2px;
}

.friend-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    cursor: pointer;
    position: relative;
}

.friend-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.friend-card-link::before,
.friend-card-link::after {
    content: none !important;
    display: none !important;
}

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

.friend-avatar {
    width: 100%;
    height: 140px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    padding: 15px 0;
}

.friend-avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.friend-card:hover .friend-avatar img {
    transform: scale(1.05);
}

.friend-info {
    padding: 0.8em 1em 1em;
    text-align: center;
}

.friend-name {
    font-size: 0.9em;
    color: #323232;
    margin-bottom: 0.4em;
    font-weight: 500;
}

.friend-desc {
    color: #666;
    font-size: 0.8em;
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 确保不显示任何链环图标 */
.friend-link-icon,
.friend-card-link::after,
.friend-card-link::before {
    display: none !important;
    content: none !important;
}


.lopwon-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    padding: 0 3em;
    font-size: 1.2em;
    color: white;
    line-height: 2;
    font-weight: normal;
    word-wrap: break-word;
    word-break: normal;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 9999;
}

@media (max-width: 768px) {
    .lopwon_friends {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .lopwon_friends ul {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* 移动端单个卡片保持正常两列布局，不受影响 */
    .lopwon_friends ul.single-card > li.friend-card,
    .lopwon_friends ul > li.friend-card:only-child,
    .lopwon_friends ul > li.friend-card:only-of-type {
        grid-column: 1 / 2;
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .friend-avatar {
        height: 120px;
        padding: 15px 0;
    }

    .friend-avatar img {
        width: 80px;
        height: 80px;
        border: 4px solid #fff;
    }

    .friend-info {
        padding: 0.8em;
    }

    .friend-name {
        font-size: 0.95em;
        margin-bottom: 0.4em;
    }

    .friend-desc {
        font-size: 0.75em;
        margin-bottom: 0;
    }

}

@media (max-width: 480px) {
    .lopwon_friends ul {
        gap: 8px;
    }
    
    .friend-avatar {
        height: 100px;
        padding: 10px 0;
    }

    .friend-avatar img {
        width: 70px;
        height: 70px;
    }

    .friend-info {
        padding: 0.6em;
    }

    .friend-name {
        font-size: 0.9em;
    }

    .friend-desc {
        font-size: 0.7em;
    }
} 
