/* 朋友卡片样式 */
.friends-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    overflow-y: visible;
}

.friend-card {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.friend-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}

.friend-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: transform 0.8s ease;
    z-index: 0;
}

.friend-card:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.friend-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.4);
}

.friend-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.friend-card:hover .friend-avatar {
    transform: scale(1.05) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.2);
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.friend-card:hover .friend-avatar img {
    transform: scale(1.1);
}

.friend-info {
    width: 100%;
    z-index: 2;
}

.friend-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
    padding: 5px 0;
    cursor: pointer;
}

.friend-name.click-tip::after {
    content: '⇗';
    position: absolute;
    margin-left: 8px;
    font-size: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.friend-name.click-tip:hover::after {
    opacity: 1;
    transform: translateY(-2px) scale(1.2);
    color: #007bff;
}

.friend-name:hover {
    color: #007bff;
    text-decoration: underline;
}

.friend-description {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.friend-card:hover .friend-description {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 朋友链接提示框样式 */
.friend-link-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 90%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.friend-link-tip.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.friend-link-tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    z-index: -1;
    border-radius: 20px;
}

.tip-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

.tip-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    flex-shrink: 0;
}

.tip-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tip-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
    overflow-y: auto;
    max-height: 50vh;
}

.tip-content p {
    margin-bottom: 10px;
}

.tip-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.tip-content li {
    margin-bottom: 8px;
    color: #555;
}

.tip-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    padding-top: 15px;
    margin-top: -10px;
}

.tip-btn {
    padding: 10px 25px;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.tip-btn.confirm {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.2);
}

.tip-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.3);
}

.tip-btn.cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.tip-btn.cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tip-url {
    background: rgba(0, 0, 0, 0.03);
    padding: 12px 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    color: #007bff;
    word-break: break-all;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}