body {
    overflow-x: hidden;
    overflow-y: auto;
}

.nav-link {
    text-decoration: none;
    color: white;
}

.friends-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.2rem;
}

.friends-hero,
.friends-card,
.friends-list-card,
.profile-card {
    background: var(--card-grad);
    border: 1px solid var(--card-border-strong);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 1.2rem;
}

.friends-hero h1 {
    font-size: 1.7rem;
    font-weight: 900;
}

.friends-hero p {
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.profile-card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.profile-info {
    margin-bottom: 1rem;
}

.profile-pseudo {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-pseudo span {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.05rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-input-group {
    display: flex;
    gap: 0.6rem;
}

.profile-input-group input {
    flex: 1;
    background: var(--card-grad);
    border: 1px solid var(--card-border-strong);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.72rem 0.8rem;
    box-shadow: var(--card-shadow);
}

.profile-input-group input:focus {
    outline: none;
    border-color: #f97316;
    background: var(--card-grad-hover);
}

.profile-input-group button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(34, 197, 94, 0.65);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(22, 163, 74, 0.18));
    color: #dcfce7;
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.profile-input-group button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 14px 28px rgba(34, 197, 94, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.profile-feedback {
    min-height: 1.25rem;
    font-size: 0.9rem;
    color: #86efac;
    font-weight: 700;
}


.friends-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.friends-card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.add-friend-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.add-friend-card h2 {
    justify-content: center;
    text-align: center;
}

.friends-card p {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.request-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid var(--card-border-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.65rem;
}

.request-actions {
    display: flex;
    gap: 0.45rem;
}

.invite-row {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    max-width: 460px;
    justify-content: center;
}

.invite-row input {
    flex: 1;
    background: var(--card-grad);
    border: 1px solid var(--card-border-strong);
    color: var(--text-main);
    border-radius: 12px;
    padding: 0.72rem 0.8rem;
}

button {
    border: 1px solid rgba(56, 189, 248, 0.72);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.26), rgba(37, 99, 235, 0.22));
    color: white;
    border-radius: 12px;
    padding: 0.68rem 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.ghost-btn {
    border-color: var(--card-border-strong);
    background: var(--card-grad);
}

.disabled-action {
    border-color: rgba(163, 163, 163, 0.5);
    background: linear-gradient(135deg, rgba(115, 115, 115, 0.35), rgba(82, 82, 82, 0.3));
    color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.9;
}

.friends-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.friends-list-head span {
    color: #86efac;
    font-weight: 700;
    font-size: 0.85rem;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.friend-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid var(--card-border-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.8rem;
}

.friend-row p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.friend-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.delete-friend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    color: #fca5a5;
    border-radius: 10px;
    padding: 0.6rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.delete-friend-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.25));
}

.delete-friend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.delete-friend-btn i {
    width: 18px;
    height: 18px;
}

@media (max-width: 900px) {
    .friends-grid {
        grid-template-columns: 1fr;
    }

    .invite-row {
        flex-direction: column;
    }

    .profile-input-group {
        flex-direction: column;
    }

    .profile-input-group button {
        width: 100%;
        justify-content: center;
    }

    .friend-row {
        flex-direction: column;
        align-items: stretch;
    }

    .friend-actions {
        width: 100%;
        flex-direction: row;
    }

    .friend-actions button {
        flex: 1;
    }

    .delete-friend-btn {
        width: 100% !important;
    }

    .request-row {
        flex-direction: column;
        align-items: stretch;
    }

    .request-actions {
        width: 100%;
    }

    .request-actions button {
        flex: 1;
    }
}
