#header-friends:checked+label[for="header-friends"]::before {
    font-family: "fontawesome";
    content: "\f102";
}

label[for="header-friends"]:hover::before {
    color: #409eff;
}

#friends {
    display: none;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
    background-color: #f8f9fa;
}

#friends.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
    padding: 0 10px;
}

.friend-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.friend-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #e8f4ff;
}

.friend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #409eff, #67c23a);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friend-card:hover::before {
    opacity: 1;
}

.friend-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f5f7fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease;
}

.friend-card:hover .friend-avatar {
    border-color: #409eff;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 19px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.2;
}

.friend-desc {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.friend-link {
    font-size: 14px;
    color: #409eff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.friend-link::after {
    content: "→";
    font-size: 12px;
    transition: transform 0.2s ease;
}

.friend-link:hover {
    color: #1989fa;
    text-decoration: none;
}

.friend-link:hover::after {
    transform: translateX(3px);
}

.empty-tip {
    text-align: center;
    font-size: 16px;
    color: #adb5bd;
    margin-top: 120px;
    padding: 40px;
    border-radius: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .friends-list {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0;
    }

    .friend-card {
        padding: 20px;
        gap: 15px;
    }

    .friend-avatar {
        width: 60px;
        height: 60px;
    }

    .friend-name {
        font-size: 18px;
    }

    .empty-tip {
        margin-top: 80px;
        padding: 30px 20px;
    }
}

#invitation-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 32px;
    background: #00b4aa;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

#invitation-btn:hover {
    background: #00b4aa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.3);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.invitation-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 1000;
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.invitation-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.modal-body p {
    margin: 0 0 12px;
}

.apply-btn-group {
    margin-top: 24px;
    text-align: center;
}

.apply-mail-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #00b4aa;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

.apply-mail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.3);
    color: #fff;
    text-decoration: none;
}